If you are a QA tester or software developer, you will come across the need to have lots and lots of testing email accounts. These are disposable or throwaway email addresses you can use to test the sending and receiving of messages in your application.
Why is it important to have dummy email addresses?
There are many reasons to use test email addresses. These include the need to use test email accounts to simulate the mass emails that you are going to send out through an application. Additionally, blank mail addresses can be used to test application login and authentication processes.
Without test email accounts, it's not possible to detect issues before you deploy the system in production. Instead of creating dummy email addresses manually, you should think about using a random email generator. It will help you to get all the dummy email addresses that you want for testing purposes within a short period of time.
How do dummy emails work?
Dummy emails are temporary email addresses, which you can get for a short period of time. There are service providers who offer dummy emails. However, you can proceed with creating them on your own as well.
You will be getting a unique email address, which you can use to receive emails. However, some of the dummy emails will even provide you the opportunity to send out emails. In most instances, dummy emails would have a validity of around 10 minutes to few hours.
Where can you create dummy emails?
If you want to create dummy emails quickly, you should locate the best random email generator out there. Here are few such options available to consider.
Creating disposable mail accounts
You can send and receive email in code from disposable email addresses:
Reading temporary mail in code and tests
With MailSlurp's SDK libraries you can easily wait for expected email content during tests and extract content.
Sending email from test accounts
If you prefer to use SMTP clients you can use the MailSlurp SMTP server to send emails from any email client or library. Here is an example of how to configure the nodemailer client:
Mailinator is one of the most popular random email address generators you can find. You can get random and dummy email addresses for workflow testing with this. All the emails that you get will be having the @mailinator.com test domain. You will not be able to attach any files to the emails that you receive with Mailinator.
Guerrilla Mail is a free service available for people who are looking for a random email generator. You don't have to go through a sing up process to start using this service. It will provide you the chance to send emails and receive emails. However, it doesn't have the best user interface for you to get work done.
Maildrop is an open-source project, which you can use to generate email addresses instantly. It is coming to you with a good-looking UI as well. It is an effective service that you can use to send out emails without attachments.
You may also use Tempmail to generate disposable emails. The inbox would show you all the incoming emails instantly, and you don't have to refresh the page. This is available for free as well.
Creating a fake email with your Gmail
You may also use your Gmail to create a fake email for testing purposes.
You should be using a Gmail account that you are not using. You just
need to add a "+" to the preferred username and follow that with some
random characters. For example, if your email address is
, you will be able to create the new email as
Likewise, you will be provided with endless opportunities to add any random characters and create new email addresses. Gmail will treat each email address as a unique email account. You can set up filters within your Gmail inbox to segregate the incoming emails, respectively.
Should you use temporary emails?
Even though the idea of using temporary emails for testing purposes looks appealing, there are some limitations to it as well. For example, you cannot use it for complex applications, such as for situations where the recipients have different permission levels.
Testing with MailSlurp disposable email accounts
MailSlurp is a free email platform for generating disposable (or permanent) mailboxes for testing and development.
Automated end-to-end email testing
MailSlurp enables application integration testing e2e using disposable email accounts.
Use Cypress JS to test with email
See the cypress test example for more information.
Playwright email testing
Playwright is an awesome browser testing tool from Microsoft that offers a different approach to Cypress (or Puppeteer). With Playwright you can automate the integration testing of email processes with MailSlurp. Here is an example:
See the playwright guide for examples.
Selenium email testing
Selenium is a popular browser automation tool. You can use it to test email processes with MailSlurp. Here is an example: