Before you begin
- 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.)
Test email addresses
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.
How do I create test email addresses?
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
build-56@abcd1234.mailosaur.net
build-58@abcd1234.mailosaur.net
# Using random user names
jill.doe@abcd1234.mailosaur.net
jack.smith@abcd1234.mailosaur.net
# Using a random string
405fca91@abcd1234.mailosaur.net
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.
Locating the domain name for a server
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.
Sending directly via SMTP
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.