* Note! This article is pretty deng old! And because of that, some of the information is no longer relevant. Please see our current SMTP documentation here for more up-to-date details on how to send through Postmark using SMTP.
Ever since we started working on Postmark we decided we would have a cool REST API that uses simple JSON as transport. Being mostly web developers ourselves, we wanted to help people break away from the SMTP tyranny. As most people around, we hated SMTP — it’s an ancient protocol and its age shows... Now we have gone back to the SMTP roots and have provided an SMTP endpoint that you can use to send messages through Postmark. Simple as that — you configure your SMTP credentials and just start sending.
But, why are you bringing SMTP back? #
Well, we are not really bringing it back. Think of the SMTP endpoint as another API entry point. We realize that the entire world does not speak our REST API (yet!), and we want to make sure we can accept messages from as many clients as possible. The whole world speaks SMTP and that is a fantastic way to use Postmark.
I can use both the REST API and SMTP access. Which one do you recommend? #
The REST API is, and will always be, the preferred choice to send email through Postmark. We fully control it and can evolve it to fit our customers’ needs best. We add and will add exciting features that are plain impossible to do with SMTP. These days I like to call SMTP access “the gateway drug” to using Postmark. It is ideal in cases like:
- You already have an application in place that sends email using SMTP. You want to try Postmark out, but you don’t want to change your code. Change your SMTP configuration to point to Postmark’s servers, and you are all set.
- You have an old legacy application and you are damn sure you don’t want to touch that code again! Proceed as above :-).
- You depend on an external tool that can only send SMTP. Now, you can use Postmark for that too.
- You happen to work with an ancient or exotic platform (COBOL anyone?) and there is no client library for our REST API for that platform. Share emails generated by your oldest code with us!
How do I use it? #
SMTP access is configured for each Postmark server.
It is not enabled by default, so you need to go to the server settings screen and enable it. SMTP sending is enabled by default in each of your Transactional and Broadcast Message Streams. You will get the connection instructions, but basically you need to connect to smtp.postmarkapp.com on port 25 and use your server API token as both the SMTP user name and password. We support both plain text and CRAM-MD5 authentication — please, do yourselves a favor and use the latter. We support various authentication methods. More details on those here.
What is not supported as compared to the REST API #
I mentioned above that advanced features will not be available over SMTP. Here is a list of what is not available or just works differently:
Tagging emails is not supported. We could have implemented that with a custom SMTP header, but our philosophy for this is that using SMTP should require no changes to your code. Modifying your code to add headers sort of defeats the purpose. We added Tag support for SMTP sending in 2014. More on that here. We do not support encrypting the communications channel. Due to a limitation of our SMTP server we do not offer TLS. If you need to guarantee encrypted message delivery, use the REST API over SSL. Postmark offers TLSv1.1 and higher connections. More on that here.
- The REST API will immediately return an error if you feed it bad data. SMTP will not. If we detect an error, such as trying to send with a From address that you have not configured in a sender signature, we will log a special “SMTP API” type of bounce. We advise that you review your bounces often or set up a bounce web hook that will alert you when that happens.
I want to know more! #
I bet you do! Head to the docs for the details.