- If you don’t already have one, create a Mailosaur account.
- You will also need to choose what server you want to send email to. Servers allow you to group tests together (for example, by project, environment, team, etc.)
When developing and testing products, you will often need a set of throwaway email addresses to test features, workflows, and email content itself.
Every Mailosaur plan provides an unlimited number of fully-functional email addresses to test with.
You don’t need to create email addresses. Instead, every server within your account has its own, unique domain name, and any email sent to this domain will be captured.
For example, if your server had the domain
abcd1234.mailosaur.net, then every one of these email addresses will work, with no setup required:
# Using build numbers email@example.com firstname.lastname@example.org # Using random user names email@example.com firstname.lastname@example.org # Using a random string email@example.com
You can make up an email address pattern that works your needs. However, if you just want a random address each time, Mailosaur’s client libraries each provide a helper method to generate one for you.
You can use these addresses in the same way you would any other email address.
You can locate the domain name of a server by following these steps:
- Go to the Servers page in the Mailosaur Dashboard.
- Click on a server.
- In the page that appears, the server domain is shown in the top-right corner of the screen.
Every Mailosaur server is a full featured virtual email server. This means that instead of using test email addresses, you can point your product directly to your server via SMTP.
This is useful in cases where you want to prevent staging environments from sending email to real customers.
It is also a great way of reducing development costs, as you do not need to pay to send test emails via your regular Email Service Provider (ESP) on staging environments.
Check out our guide on testing directly via SMTP.