• HOME
  • How-to
  • How to create Mail Agents for transactional emails

How to create Mail Agents for transactional emails

  • Published : April 10, 2023
  • Last Updated : August 18, 2023
  • 586 Views
  • 5 Min Read

Introduction

Once you've created your ZeptoMail account, you will be using it to send different types of transactional emails along with managing multiple applications of your clients. This process might be simple when it involves fewer recipients. However, with a larger client base and thousands of emails triggered on a daily basis, it will be cumbersome to handle them. In order to grease the wheels, Mail Agents help you categorize your transactional emails according to your preference. For example, you can assign separate mail agents for sending OTPs, welcome emails, and so on.

This section elucidates everything you need to know about Mail Agents in ZeptoMail.

What is a Mail Agent?

As previously mentioned Mail Agents aid in categorizing your transactional emails based on different user activities. In ZeptoMail, you can add up to 50 Mail Agents. You can also add multiple domains under a single Mail Agent. For example, you can assign a dedicated Mail Agent for OTPs sent from all your applications. This makes it easier to categorize them according to your purpose.

Apart from this, if you are someone who runs multiple businesses, you can assign separate Mail Agents to each one of them to manage their functions. You can also restrict access to your account users depending on their roles and function. For example, some need read access while some require read as well as write.

Mail Agents can also be used by developers in different environments and at different stages of the application development. Since each Mail Agent has unique SMTP and API credentials, you can easily handle the emails sent from them.

Sections of a Mail Agent

The mail agent section in ZeptoMail consists of the following options :

  • Transactions overview
  • Setup Info
  • Domains
  • Sender Address
  • Processed emails
  • Templates
  • Webhooks
  • Email tracking
  • File cache

Overview

Overview compiles and presents the status of all the emails sent over a period of time. The data can be viewed either as a line chart or bar graph and you can also select the time (number of days) during which you wish to evaluate your activity. You will be able to view the count of emails sent along with the opens, clicks and bounce rates over time in the graph.

Setup Info

The Setup Info section provides the SMTP, API and integration credentials to send your emails. You can simply copy paste the Send Mail Token provided, in the body of your code to start sending out your emails.

Domains

The very first step after creating a mail agent is associating a domain to it, using which, you can process your emails. Once you've associated the domain, it is necessary to verify it. Emails will not be sent from your domain, until it is verified. You can easily verify your domain by configuring the SPF,DKIM and CNAME records in your DNS server. More about domain verification can be found here. Once verified, you can add the bounce settings to that domain and start sending your emails. 
 

Sender address 

Sender address allows you to add and associate email addresses to your Mail Agents to send transactional emails. You can add a sender address by navigating to the Sender address section on the left pane. The sender address tab within each Mail Agent will list the sender addresses associated with that particular Mail Agent.

Tracking your emails

Transactional emails are important and hence it is necessary to track them in order to know if they have reached your clients and are engaged with. This helps you to be more proactive and make changes to your service. The email tracking option helps you track the open and click rates of your emails. You will have to enable tracking separately for each Mail agent.

Processed emails

This section gives the details of the emails sent from a particular Mail Agent. You can view the following details by clicking the Processed emails tab under the Mail agent you wish to review

  • From and To - the sender and receiver email address.
  • Date and time -the email was sent.
  • Request Id - a unique transaction ID for the whole set of email (to, cc, bcc).
  • Status - the status of the email sent. It can be Processed, Process failed, or Multiple status.
  • Clicks - the number of times the particular link in the email was clicked.
  • Opens - the number of times the particular email was opened.

The log displays 60 days' worth of data. You can also search and filter through the emails using the parameters. Further, the logs can be exported using the Export option, to your local server for future references.

Templates

Some transactional emails have to be sent more frequently than others and instead of writing them out every time, you can create templates and use them. In ZeptoMail, you can use the sample templates available or create a custom template to suit your needs and even edit them. You can even send test emails using these templates to know how it looks to your customers. Steps to create your first template can be found here.

Webhooks

Webhooks are automated messages sent between applications when an action takes place. In ZeptoMail, webhooks are used to transfer the data about the number of opens, clicks and bounces in the emails you send. Each time these actions occur, an HTTP callback occurs to your application, and the information is communicated to you. You need to configure the Webhook URL in your ZeptoMail account in order to receive this information. Once you add your Webhook URL, you can even edit and test it. More information on how to get started with Webhooks can be found here.

File cache

You may want to add images to your transactional emails and instead of accessing them from your local server every time, you can add them to the File cache section, to manage all of them from a single place. Once you upload your attachment to the section, it will be assigned a file cache key. This can then be added to your API while sending the emails. File cache supports 1GB of storage. This section gives you the detailed procedure to add attachments to the file cache.

Connecting Mail Agent to your application

In order to send your emails using ZeptoMail, you need to configure your application with the Mail Agent. Each Mail Agent has distinct SMTP and API credentials that need to be set up separately. There are two ways in which you can configure your application :

  • SMTP method
  • API method

Follow the steps below to configure your application :

  1. From the left menu, select the desired Mail Agent
  2. Navigate to the Setup Info tab. The Setup info window opens.
  3. In the window, you will find the different methods (SMTP or API) by which you can configure your application. Choose the one you prefer and follow the steps given below.

API method :

To send emails via API, copy the Send mail token generated in your account to the API code.

SMTP method :      

To send your emails using SMTP, the following choices should be configured :

  1. Server name: smtp.zeptomail.com
  2. Port number and authentication: 465(SSL), 587(TLS)
  3. Username: email API key or 'from' address 
  4. Password: As mentioned in the Setup info box.

Note: You can also use headers in your SMTP and API to track your emails. Details on tracking can be found here.

Leave a Reply

Your email address will not be published. Required fields are marked

By submitting this form, you agree to the processing of personal data according to our Privacy Policy.

You may also like