5-Step Mailpit Configuration for Offline Email Testing

  • Riju
    Riju Ghosh
  • sundew
    5 min.read
  • sundew
    December 3rd, 2024
  • Technology
sundew

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!

Thoughts and Trends
Across Our Focus Areas

sundew

Blog

Best Cross Platform App Development Frameworks: How to Choose One?

The planning, design, development, testing, and deployment stages demand precision, leaving little room for error. This is why businesses must carefully choose the right technologies and frameworks to streamline mobile app development while maintaining high performance and quality.By using these advanced frameworks, companies can significantly reduce development time, minimize costs, and maintain a single codebase for both iOS and Android platforms.Why are Cross-Platform Application Development Frameworks Dominating Now?Developing separate native applications for iOS and Android requires businesses to up their investment. This happens in terms of maintaining two distinct codebases, multiple development teams, and doubling efforts for updates and feature rollouts. This further complicates the already exhaustive mobile app development process. This has given rise to the popularity of cross platform mobile app development frameworks, which take all the burden off businesses in the following ways:Unified Codebase Across PlatformsDevelop once, deploy everywhere. A shared codebase eliminates the need to write and maintain separate logic for each platform. Tools like Kotlin Multiplatform let you reuse key components, like business logic or data handling, across devices, reducing duplication and effort.Faster Development & Quicker Time-to-MarketA single codebase speeds up development and reduces time-to-market by up to 50%. Features like Flutter’s Hot Reload and React Native’s Fast Refresh allow real-time UI updates without restarting the app.Cost-Efficiency with Smarter Resource Usage Running separate development teams for Android and iOS can drain time and budget. With a shared codebase, a merged team can build both iOS and Android apps, maximizing your technical resources and lowering overall costs significantly.Scalability & Multi-Platform AdaptabilityModern apps need to work on mobile, web, desktop, and even wearables. Cross platform app development frameworks offer multi-platform support, making it a future-proof choice.Consistent UI/UX Across DevicesWith Flutter’s Material and Cupertino widgets, you don’t have to wonder which framework is best for iOS development or which one suits Android the best. These widgets enable a native-like experience on OS. Similarly, React Native allows seamless integration with native UI components, offering a smoother user experience.Cloud & AI IntegrationBoth Flutter and React Native integrate with Firebase, enabling real-time updates, authentication, and AI-powered analytics.Top 5 Cross-Platform App Development Frameworks Flutter and React Native are the go-to cross platform mobile application development frameworks at the moment that continue to lead the cross-platform space. Let’s take a deeper look into the offerings leading to their growing adoption in line with the industry's increasing demand for scalable and cost-effective mobile solutions.FlutterFlutter is particularly useful if you want to deliver a near-native user experience through cross platform mobile development. This will come complete with access to device features like camera, location services, and storage. If a specific native functionality isn’t directly supported, developers can bridge the gap using Platform Channels to write platform-specific code. Its versatility is what has earned the trust of 46% of developers worldwide and brands like Google Ads, Alibaba’s Xianyu, eBay Motors, and the Hamilton app.Why Choose Flutter?Share UI components across platforms effortlesslyBuild MVPs quicklyOptimize performance for CPU/GPU-intensive appsUSPs:Hot Reload for rapid iterationMaterial & Cupertino widgets for a consistent UI across platformsOwn rendering engine for smooth cross-platform performanceBroad platform reach: iOS, Android, web, desktopReact NativeIn case you are aiming to build a lightweight and not-so-complex app, React Native can be the best cross platform app development framework for you.Introduced by Facebook in 2015, React Native is an open-source framework that enables developers to build hybrid mobile apps using JavaScript. Built on ReactJS, it allows code reuse across Android and iOS platforms while maintaining a native-like user experience. Why Choose React Native:Access to a variety of third-party UI libraries speeds up iterationIdeal for teams already familiar with JavaScript or ReactUSPs:Fast Refresh for instant code updatesNative components for enhanced UI/UXBuilt-in debugging tools via FlipperStrong community support and frequent updatesKotlin MultiplatformKotlin Multiplatform is ideal among cross platform app development frameworks when you want to share core logic without compromising on a native user experience. Developed by JetBrains, it allows you to reuse business logic across Android and iOS. At the same time, it supports native UI frameworks, offering the flexibility to tailor interfaces for each platform.Its seamless integration with existing codebases and growing adoption by apps like Netflix, Cash App, and VMware reflect its power and practicality.Why Choose Kotlin Multiplatform?Reuse Kotlin code and skills across mobile, web, desktop, and backendBuild native UIs using platform-specific toolsEasily integrate into existing apps without a complete rewriteUSPs:Compose Multiplatform offering full code-sharing flexibilityGradle support for smooth build and dependency managementNative-like performance with Kotlin’s modern syntaxInteroperable with existing Android/iOS codebasesXamarin Ideal for teams already familiar with .NET and C#, Xamarin supports up to 90% code reuse, accelerating development timelines and reducing maintenance efforts.With seamless Visual Studio integration and access to native APIs, Xamarin delivers a native look and feel, without the need to build separate codebases for each platform. It's a tusted choice for leading organizations like The World Bank, BBC Good Food, Alaska Airlines, and FreshDirect.rWhy Choose Xamarin?Native UI and performance with access to platform-specific APIsStreamlined development with powerful Visual Studio integrationBuilt-in support for RESTful APIs, cloud services, and backend systemsUSPs:Extensive .NET library support and plugin ecosystemReduced hardware compatibility issues via platform-specific pluginsStrong compile-time checking for fewer runtime errorsNode.jsNode.js is an open-source, cross-platform runtime environment built on the Chrome V8 JavaScript engine. Known for its efficiency and scalability, Node.js is ideal for developing server-side applications and scalable networking apps.Trusted by companies like PayPal, LinkedIn, and Walmart, Node.js enables developers to create fast, scalable, and efficient applications.Why Choose Node.js?Handle multiple concurrent connections with easeAsynchronous, non-blocking APIs for improved performanceIdeal for real-time and data-intensive applicationsSingle-threaded event loop model for scalable server-side operationsKey Features:Asynchronous and non-blocking I/O model excels at handling multiple concurrent connections.Fast code execution with Chrome’s V8 engine.Efficient data streaming in chunks, reducing the need for buffering.Single-threaded event loop ensures that Node.js can scale effectively, handling many simultaneous requests with minimal resources.Popular Cross-Platform vs Native Mobile Application Development Frameworks ComparisonWhat’s next?As these leading cross platform app development frameworks continue to evolve and compete for dominance in the market, it will be interesting to see how they stand up against emerging technologies. Companies looking to stay ahead can benefit from utilizing expert cross-platform application development platforms. This will make sure their apps deliver seamless functionality and a consistent, engaging user experience across devices. With the right expertise, businesses can elevate their mobile solutions to meet both current and future demands.

Read More
sundew

Blog

A Few Merits & Demerits of WordPress for Your Business

In case you own a business, it’s imperative for you to have a website for the same in order to withstand the competition and to grow your business. But how to actually create a website in the first place? If you do not have any clue about the intricacies of the same, you will have a lot of queries in your mind, which is natural! You might think which platform to use to create one and even if you have an old website, you might need to know the ways of revamping it for escalating your business growth and to make sure that it doesn’t become obsolete in the coming months.There are numerous platforms available on the web which will promise you to provide free websites for your business. However, you must always choose the right one and WordPress is the most common of all. In order to create a website on WordPress, you need to get in touch with a website development company or individual developers who specialise in WordPress website creation. However, before you do so, you must learn the merits and demerits of having a WordPress website for your business.But before that, here are a few facts about WordPress:1. More than 75 million websites depend on WordPress.2. WordPress powers 23% of the entire websites, almost.3. In WordPress, there are more than 45,000 plugins.Now, here are a few advantages of using WordPress platform:1. It’s Open-Source: The best part of WordPress is that it’s an open –source platform which means that the developers can make use of the code written or used already without modifying the same or having to start from the beginning. This is quite a relief, isn’t it? Also, there are large communities of developers available for WordPress and they can share codes among themselves thereby saving the time for writing new ones and implementing the same.2. It’s Easy to Operate: Websites need to be refurbished occasionally to be on track with the technological advancements happening over the web. So, to do this in your WordPress website, you do not need to get in touch with designers or developers to modify your website. This is because you can make all the changes yourself without having to write a single code. This will save you a lot of time as well as money!3. It’s Simple with Higher Usability: With other frameworks, you will need to have some kind of understanding of the technicalities and knowledge but this isn’t true for WordPress. Even with zero technical background, you can still use it and that too, quite effortlessly. So, with WordPress, there’s no need to be aware of the programming languages like PHP, HTML, CSS, and so on.Here are a few demerits of WordPress:1. It’s Open-Source: An advantage can also be a disadvantage at times! So, when we said that it’s open-source and hence, it doesn’t need any code, it can also be a reason for your website’s downfall. It is being used widely and therefore, is an easy target for the hackers. Your website can be vulnerable to cyber-attacks as the code that you would have used for your website can be written by someone else and so, there can be a possibility of your website carrying malicious bugs which can hinder its overall functionalities.2. Excessive Plugins: Usually, plugins are meant for enhancing the functionality of a website but too many plugins can work differently as well! Too many plugins can also affect the overall performance of your website and make it slower with a decreased response time. Hence, it’s better to refrain from using such plugins and with every new update, try and uninstall the ones which are not in use anymore.3. Decreased Speed of the Website: As the WordPress websites need numerous generic codes and plugins for uniting the several functionalities into the website, the website is more likely to respond slowly and the loading time can also get decreased. So, when users will find that your website isn’t responding well to their command, they might consider going for other alternatives!4. Security is what matters: As the most popular CMS for websites WordPress is easy target for hackers and spammers. WordPress is though being one of the most user-friendly website development platform available to us, it is terribly vulnerable to attacks. A study says that more than 70% installations that happen are vulnerable as the developers do not practice proper security protocols for the platform.Although, it’s not at all easy to outline every single merit and demerit of using WordPress framework and to know firmly whether you should go for it or not, the above-mentioned points are the most common ones that every business owner must consider while thinking about making use of WordPress for building a website. Also, this blog is just a general informative one which is meant for letting the readers know about this particular framework in detail. This write-up doesn’t provide an argument for or against the usage of WordPress. It’s for you to read this and decide whether or not you should make use of WordPress for creating a website for your brand / business. The decision and choice is yours completely.

Read More
sundew

Blog

5 Benefits of Coding with React Native

React Native was first introduced by Facebook in 2013. It is a programming language that allows developers to build cross-platform mobile applications using JavaScript. This particular framework comes with many tools that are best for web developers.Furthermore, it has brought a style to UI development that hinges on a modest idea. As per React Native, UI is a function of data and if that data changes, UI must also change. With React-Native it is possible to develop an application once and deploy it on both iOS and Android. React Native allows developers to see their code and incorporate on real mobile screens at the same time. Some of the benefits of React Native are outlined below:    Community-drivenThe development of the React Native framework, responding to the need of the developer community, combined the advantages of mobile app development with the power and agility of the native React environment.There are substantial advantages to using such a community-driven environment like the availability of a huge team of enthusiastic JavaScript and Native developers keen to share their knowledge and expertise and huge catalogues of freely available components.If you choose React Native for developing a mobile app, you do not have to be concerned about the framework falling behind in terms of improvements in mobile software. React Native is consistently improving, so one can always be assured of having the application built on the best of technologies. Maximum code reuse & cost savingBy using React Native, one can deploy the same code on iOS as well as on Android. This saves a lot of development time and cost. Ideally, this will cut the development effort by half. While in practice, the cost saving will be a little lower but it will make the investment worth your while. As per the recent studies, about 90% of the code can be reused between Android and iOS, but it would be wise to calculate some extra time for practical alterations as well. Live reloadReact Native allows you to create powerful mobile applications with additional feature like ‘live reload’, enabling you to immediately see the result of the latest change that you have made to the code. If you have two windows opened – one containing the code and the other showing a mobile screen as a result of the code – you can immediately see the effect of what you have changed in one screen, or on the other screen. Strong performance for mobile environmentsThe React Native architecture is very well tuned to mobile devices and they are relatively faster than Native apps. It makes use of the Graphics Processing Unit, while native platforms make use of Central Processing Unit.   Modular and intuitive architecture similar to ReactThe modular and intuitive interface makes it easy for other developers to delve into someone else’s project and build upon it. This surges the flexibility within a development team and makes it easier to create updates and upgrades to web applications. Also, testers will need less time to understand the programming logic and build appropriate testing setups.Benefits of Coding with React Native can be further extended from web to mobile and vice versa. These merits are worth considering before kicking off with React Native. 

Read More

Thank You!

Excellent!

Successfully subscribed to Sundew Solutions newsletter!

Acknowledged