SMTP and API

There are two ways in which you will be able to send emails using ZeptoMail service:

Email Sending with SMTP

What is SMTP?

SMTP or Simple Mail Transfer Protocol is the method by which any application can connect with an SMTP server to send emails. In-order to use ZeptoMail SMTP servers, you will have to configure your application settings with ZeptoMail's SMTP information.

If your application is already using any other email provider to send transactional emails, it is easier to migrate to ZeptoMail by replacing the existing SMTP settings with ZeptoMail's SMTP settings.

To connect to ZeptoMail via SMTP method add the following details:

SMTP Configuration settings for ZeptoMail 

  • Server name - smtp.zeptomail.com
  • Port Number, Authentication - 465 (SSL), 587 (TLS)
  • Username - emailapikey (we also support applications that use the From address as the username)
  • Authorization - Password. Visit here to check your password

You can use the files uploaded to File Cache as attachments while sending emails using SMTP. Add X-TM-FILE-KEY parameter to the header and enter the File Cache Key as the parameter value.

Example: Multiple file cache keys without name - message.addHeader("X-TM-FILE-KEY", "filecachekey,filecachekey"); Multiple file cache keys with name - message.addHeader("X-TM-FILE-KEY", "filecachekey:name,filecachekey:name");

You can also use X-TM-OPEN-TRACK and X-TM-CLICK-TRACK parameters in the email header to track emails sent via SMTP

Note:

  • ZeptoMail supports TLS v1.2 for SMTP.
  • While sending your email via SMTP, the bounce address added in your Mail Agent should be used. If you leave the bounce address field empty or configure it with an invalid bounce address, then ZeptoMail will use its default bounce address while processing your email.
  • If your SMTP application is restricting longer passwords, then you can generate a shorter password. Shorter passwords are generally less secure. Click on Generate shorter password to get your shorter password.
  • When you generate a shorter password, your application can either use the From address as username value or you can generate the new Username value for the shorter password by clicking on username value.

Email Sending with API

Your application can use ZeptoMail's REST API to make HTTP requests to send emails via ZeptoMail. The HTTP POST request can be made to our send mail API endpoint https://api.zeptomail.com/v1.1/email with the JSON message attached to the body.

Authentication Headers

Application developers can authenticate API requests to ZeptoMail by adding an authorization parameter as shown below in the header section. This is the Send Mail Token (a unique token for every Mail Agent) that you can generate in your ZeptoMail account.

Authorization - zoho-enczapikey <space> <send mail token>. You can visit here to get your send mail token.

If API requests are made to ZeptoMail without these headers, you will receive HTTP response "401 Unauthorised" error.

Mail Send API - JSON format

JSON messages are passed in the body of the HTTP POST request. You can go to API documentation section to view:

Note:

Before you get started it is important to know that ZeptoMail is for sending transactional emails like welcome emailers, password resets emails, OTPs. We do not support sending of bulk emails or promotional emails like newsletters or marketing campaign emails. If you are looking for a bulk email provider, you can visit Zoho Campaigns.