Before you start sending emails to real users in your production environment, it’s always a good idea to start by sending test messages. You might even configure non-production environments to streamline the process of testing your emails. This gives you a safe environment to work out any kinks in your sending and how the emails look once they reach the inbox.
So how do you send test emails? Here are a few best practices to keep in mind to make testing your emails a little easier.
Sandbox Mode allows you to safely test different parts of Postmark, such as bounces or webhooks, without sending to real recipients. Everything set up in a Sandbox Server will work the same way as a real Server, except for the actual email delivery, so you can fully test the application. Read more here on how to set up a Sandbox server, generate fake bounces, and more.
Generate fake bounces using our blackhole domain
Postmark offers a black hole domain (bounce-testing.postmarkapp.com) which allows you to fully test out bounces with your integrations. Using our black hole domain will generate a fake bounce in your Postmark activity and trigger any connected webhooks, in the same way a normal bounce works. It doesn’t count towards bounce limits or affect your sending reputation, so we would recommend this option over generating bounces to your own domain.
Test a bounce email to your own domain
The most important thing to remember about testing emails is that the sending reputation of your production domain could be damaged if you’re not careful. If you send test emails from your production domain to fake addresses, or real addresses with low engagement, this can hurt the reputation of your domain and affect delivery in the future.
It’s best to test using your own domain using a non-existing email address. This way the bounces won’t negatively impact your overall sending reputation.
- You could set up a mailbox on your domain like: firstname.lastname@example.org and send all of your test emails there. Another option would be to set up a development subdomain domain like email@example.com and have all of the test messages go there instead.
- Use firstname.lastname@example.org. Using this for the recipient will send a test message that’s shown in Postmark’s Activity and Postmark will drop the message on our end. It’s also worth noting with this option that each email sent to that address will count towards your monthly limit.
Testing with the API
Postmark has a testing option you can use when sending via the API. We have a test API Token “POSTMARK_API_TEST” which you can use instead of your real API Token. This will allow you to make sure the API call you are using is valid and get a real response back. Using this method will not allow you to see the messages in your activity, nor will they get sent out, but it will tell you if your messages are being accepted. There’s also not a way to simulate a bounce with the Test API token.
Sending to multiple addresses
If your email provider supports aliases, you can use an alias of your email. For example, Gmail supports aliases so if your email address was email@example.com then you could create a new user using the + symbol for an alias, like firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, etc. Postmark will register them as different email addresses, while emails will still go to the single inbox of email@example.com.