Drag
5-Step Mailpit Configuration for Offline Email Testing 5-Step Mailpit Configuration for Offline Email Testing
Date December 3rd, 2024
Time to Read 5 min.
Technology

5-Step Mailpit Configuration for Offline Email Testing

by Riju Ghosh

There are several ways to test and debug SMTP emails. The most common method is to use an online service like Mailtrap or Mailgun. While these tools are incredibly useful, they often come with a cost and require an internet connection, leading to resource constraints, especially with the free tiers.

Developers often find themselves sending email notifications frequently to test different functionalities. In the search for efficient and cost-effective solutions, professionals often look for alternatives that could be used offline. 

Among these are two offline-based software options for testing emails locally: Helo (Paid) and Mailpit (Free | Open Source). Given that Mailpit is free and open-source, it is a go-to tool for many. In this blog, get familiar with how to install and configure Mailpit, making email testing both accessible and efficient.

How to Use Mailpit for Offline Email Testing?

If you’re wondering how to set up Mailpit, the following steps can help you get started.

Step 1 - Download Mailpit

Follow the install instructions here:

GitHub - axllent/mailpit: An email and SMTP testing tool with API for developers

For windows you can check the releases page. There can be multiple variants, namely AMD, ARM and x386. You would need to download the file based on your OS and processor type.

  • AMD/AMD64 - For Intel/AMD processors
  • ARM - ARM processor (mostly found in mobile devices)
  • x386 - 32-bit Intel processors

Step 2 - Install Mailpit

While installing on Linux is easy, there are a few more steps to follow on Windows.

Once the zip file is downloaded, extract it to a location as per your choice. The extracted contents will look like this:

Install Mailpit

Step 3 - Add mailpit path to environment

To add the mailpit path to environment $PATH variable, follow these steps:

3.1. Search for env

Search for env

3.2. Click on the control panel item. It will open this window. Then click on the highlighted button. 

System Properties

3.3. You may choose to modify either the user or system variables. Select path and then click on edit according to your selection.

Select Path

3.4. In the newly opened window, click on New and add mailpit installation path like the following.

Edit Environment Variable

3.5. Click OK → OK → Apply → OK.

Step 4 - Using persistent storage

All email data will be lost once mailpit closes. To mitigate this, we can use a sqlite database.

Just create a blank file but make sure to keep its extension as .sqlite

You can keep the file anywhere on your system but it is suggested to create the file in the installation folder.

Step 5 - Launch Mailpit

Run the following command in your terminal to launch Mailpit with persistent storage.

mailpit -d "" -v

Replace  with the actual path to your sqlite DB file. -v is used to enable verbose logging

Once the mailpit server starts, you can access it via 127.0.0.1:8025.

Other customization options can be found in their official documentation.

Bonus: Create alias to launch mailpit

alias mpit=mailpit -d "C:\\mailpit\\maildb.sqlite" -v $*

Wrapping Up

Thank you for reading! Hopefully, this guide on Mailpit configuration and use for offline email testing has been helpful. If you have any questions or need further assistance, please don't hesitate to contact us. We’d love to hear about your experiences with Mailpit or any other tools you use for email testing.

Stay connected for more tips and tutorials!

Happy coding!

Riju Ghosh
Riju Ghosh
Full Stack Developer

With extensive experience in both front-end and back-end technologies, Riju Ghosh specializes in building robust and scalable web applications. Committed to integrating industry best practices, he delivers advanced solutions and drives sustainable digital growth through his technical expertise and passion for innovation.

Email us or Talk to us at +91-98367-81929 or Simply Contact Us through the website.

Please share your email address to read more.

Terms & Conditions

General terms & conditions for the provisions of services from Sundew Solutions Private Limited

1 - Scope and subject to change

Sundew Solutions Private Limited, hereinafter referred to as Sundew Solutions, under the brand Sun Dew Solutions Private Limited provides all deliveries and services to its contractual partners exclusively on the basis of these General Terms and Conditions (GTC).

2 - Conclusion of a contract

A contract comes off only by order of the customer by means of online order and the delivered by Sun Dew Solutions invoice and its acceptance by the customer.

3 - General Terms and Conditions

3.1 - All individual prices and the subtotal are exclusive of statutory GST as applicable for Indian Business Entities. For service provision within India, an additional GST Rate of 18% is applied.

3.2 - Services marked as optional are not automatically part of the order. These must be explicitly commissioned additionally. Optional positions are marked as such.

3.3 - It is assumed that both text content and image data in digital form, as well as desired templates and plug-ins are provided by the client (customer) and desired content in electronic form (eg Word, PDF, etc.), as far as it does not differ from the offer.

3.4 - For services that are not included in the ordered offer and are additionally commissioned by the customer, Sundew Solutions settles on the basis of the effective effort (Time & Material). The hourly rate is USD 25.00 – USD 40.00 per hour.

3.5 - For services for which a project contract for customized solutions is concluded, the agreed scope of services and expenses shall be calculated in such a way that it is required for the achievement of the objectives. If the offered value is significantly exceeded, the resulting budget requirements may change during the course of the project in the corresponding ratio. These are recorded as amendments and released by the customer.

3.6 - Services, software or other components of this offer, which are manufactured or provided by a third party and are marked as such, are not subject to the warranty of Sundew Solutions, but of the actual manufacturer or supplier. This applies in particular to templates and plugins procured or provided by the customer.

3.7 - All contents listed in the offer for customized solutions are protected by copyright and are not intended for distribution to third parties.

4 - Delivery and payment conditions

4.1 - The terms of payment are basically as follows:

• Standard packages according to online offer: advance payment to our bank account or online payment via PayPal

• Customer project: 1/3 when placing the order, 2/3 after completed installation on the customer server

4.2 - The specified delivery time begins after receipt of payment and kickoff meeting with the customer. From this, time is expected in full working days. The default work week is Monday through Friday.

4.3 - The final delivery time depends on the customer acceptance (UAT) and can thus exceed the specified delivery time.

4.4 - Delivery and performance delays due to force majeure and events that make it difficult or impossible to perform the service substantially, such. For example, strikes, lockouts and official orders are not the responsibility of Sundew Solutions. Unless otherwise provided by law, Sundew Solutions is not liable for damages in this case.

4.5 - Invoice amounts can be transferred either via electronic payment portal PayPal or through Bank Wire Transfer as shared by the Accounts and Finance Department of Sundew Solutions Private Limited during the course of Project Sign Up.

4.6 - Our offers are aimed primarily at business customers. All prices are net prices plus GST at the rate of 18% for service that is provided within India.

4.7 - If invoicing takes place by invoice, the payment must be received within 10 days from the invoice date and according to the payment plan. For the standard packages, see article 4.1. directed.

4.8 - Contract and invoice currency is Indian Rupees for all Business and Individual customers in India and will be in USD, GBP, AED, EURO etc. for Invoices raised to Business entities outside India.

4.9 - The delivery is deemed to have been delivered with the customer's consent, but no later than 14 days after the delivery of the final report to the customer, and thus as a service rendered. If the customer has complaints after this period, Sun Dew Solutions is not obliged to implement them. In this case, the payment of the outstanding amount is obligatory and must be settled by the customer immediately. Not affected by this are services under warranty & support.

5 - Delay, dunning costs:

For dunning costs incurred after default, we charge 5% interest on the outstanding amount. Further claims, in particular with regard to the enforcement of the claim by a collection agency remain reserved.

6 - Retention of title and rescission

6.1 - The services remain the property of Sundew Solutions until full payment, even if they are resold (extended retention of title). In the event of late payment, Sundew Solutions can also withdraw from the contract and reclaim the already provided sources (software code).

6.2 - If the client cancels the order before completion for reasons beyond the control of the contractor, the contractor shall be entitled to charge the costs incurred until then on the basis of the above hourly rate; the percentage of progress or documented effort (hours worked) is calculated as the basis for the effort estimate.

7 - Warranty and Liability

7.1 - Sundew Solutions assumes no liability for damage caused by the use of Sundew Solutions products handed over to the customer (software).

7.2 - If the delivered services are defective at the time of delivery, Sundew Solutions will provide for the removal of the defect. In case of failure of the repair or replacement, the customer may demand the reduction of the remuneration or the withdrawal from the contract.

7.3 - The liability for own negligence, as well as that of our legal representatives and vicarious agents, is limited to intent and gross negligence.

7.4 - The customer is solely responsible for the name and brand of his logo and design. Sun Dew Solutions accepts the documents provided by the customer to the best of its knowledge and belief. It is the customer's responsibility to investigate any trademark infringement or legal violations in connection with image rights, templates or plugins. The liability of Sundew Solutions is limited to the amount of the order value. Sundew Solutions cannot be held liable for the misuse of the logo or other graphic means and products. Any claims of third parties are fully transferred to the customer.

8 - Privacy Policy

8.1 - The data required for the transaction will be stored in strict accordance with the provisions of the International Data Protection Act and, if necessary, passed on to affiliated companies, as well as third parties for the order processing of engaged companies. All personal data is kept confidential and used only for internal purposes.

8.2 - The web sized products may be used by Sundew Solutions as reference works for promotional purposes, unless the customer expressly disagrees on this point. The products are presented for illustrative purposes only.

9 - License agreements and use of products

The customer receives for all delivered and approved solutions (websites, apps, etc.) an unrestricted grant of rights of use.

10 - Applicable Indian law

It applies to the general terms and conditions and the entire legal relationship between the customer and Sun Dew Solutions. Jurisdiction is, unless otherwise agreed, Kolkata, West Bengal.

11 - Final Provisions

Changes or additions to these GTCs are only valid if they have been agreed in writing. This also applies to a change of this written form clause.

Work Office:

Adventz Infinity
Module 702, 7th Floor,
BN Block, Sector V, Bidhannagar,
Kolkata: 700091, West Bengal, India.

Registered Office:

Adventz Infinity
Module 705, 7th Floor,
BN Block, Sector V, Bidhannagar,
Kolkata: 700091, West Bengal, India.

USA Office:

200 Broadhollow Road,
Suite 207,
Melville, NY 11747.