Email sending with SMTP

‚ÄčThere are two ways in which you can send emails using ZeptoMail :

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's 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.

While sending your emails using SMTP :

  1. 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");
  2. You can use X-TM-OPEN-TRACK and X-TM-CLICK-TRACK parameters in the email header to track emails sent via SMTP.
  3. You can use the message.addHeader("X-TM-CLIENT-REF","testClientRef"); identifier to track a specific transaction.
  4. If you are using SMTP to send your emails, as a security measure, we recommend you to add your IP(s) to the IP restriction list

SMTP error codes : The commonly intercepted errors while sending your emails using SMTP can be found here.

Points to be noted :

  • 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.