Features

Dynamic email templates

Use a single email template to build one-to-one customer relationships on a mass scale. Send a few or a few million emails with messages that are automatically personalized based on each recipient.

Work more efficiently with dynamic email content

Avoid the hassle of constantly segmenting your lists and writing new copy for every transactional email. Work smarter by creating a single template that uses dynamic data to personalize your messages.

MailerSend
MailerSend

Enhance emails with personalization

Tailor email templates to individual people with variables for names and other data. Use filters, conditional statements, and for loops for more powerful personalization to create dynamic tables, fallback values for variables, and conditional dynamic messaging.

MailerSend

Send faster with dynamic email templates

Save time with our library of dynamic email templates. All templates include widely used variables, like name and order information, so all you need to do is include them on the API call.

MailerSend

Create dynamic emails with text/HTML

Skip the templates and write your own text/HTML dynamic emails to send via API call or SMTP. Easily add variables to personalize the content for each recipient.

Send dynamic email templates quickly with our API

Start sending in minutes with official libraries for your favorite programming language, including PHP, Java and more. Simply use the pre-built code on your template’s page.
Read our API docs
curl -X POST \
https://api.mailersend.com/v1/email \
    -H 'Content-Type: application/json' \
    -H 'X-Requested-With: XMLHttpRequest' \
    -H 'Authorization: Bearer {place your token here without brackets}' \
    -d '{
        "from": {
            "email": "your@email.com"
        },
            "to": [
        {
            "email": "your@client.com"
        }
        ],
        "subject": "Hello from MailerSend!",
        "text": "Greetings from the team, you got this message through MailerSend.",
        "html": "

Greetings from the team, you got this message through MailerSend.

" }'
use MailerSend\MailerSend;
use MailerSend\Helpers\Builder\Recipient;
use MailerSend\Helpers\Builder\EmailParams;

$mailersend = new MailerSend(['api_key' => 'key']);

$recipients = [
new Recipient('your@client.com', 'Your Client'),
];

$emailParams = (new EmailParams())
->setFrom('your@email.com')
->setFromName('Your Name')
->setRecipients($recipients)
->setSubject('Subject')
->setHtml('

Greetings from the team, you got this message through MailerSend.

') ->setText('Greetings from the team, you got this message through MailerSend.'); $mailersend->email->send($emailParams);
const Recipient = require("mailersend").Recipient;
const EmailParams = require("mailersend").EmailParams;
const MailerSend = require("mailersend");

const mailersend = new MailerSend({
    api_key: "key",
});

const recipients = [new Recipient("your@client.com", "Your Client")];

const emailParams = new EmailParams()
    .setFrom("your@email.com")
    .setFromName("Your Name")
    .setRecipients(recipients)
    .setSubject("Subject")
    .setHtml("

Greetings from the team, you got this message through MailerSend.

") .setText("Greetings from the team, you got this message through MailerSend."); mailersend.send(emailParams);
package main

import (
    "context"
    "fmt"
    "time"

    "github.com/mailersend/mailersend-go"
)

var APIKey string = "Api Key Here"

func main() {
    ms := mailersend.NewMailersend(APIKey)

    ctx := context.Background()
    ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
    defer cancel()

    subject := "Subject"
    text := "Greetings from the team, you got this message through MailerSend."
    html := "

Greetings from the team, you got this message through MailerSend.

" from := mailersend.From{ Name: "Your Name", Email: "your@email.com", } recipients := []mailersend.Recipient{ { Name: "Your Client", Email: "your@client.com", }, } variables := []mailersend.Variables{ { Email: "your@client.com", Substitutions: []mailersend.Substitution{ { Var: "foo", Value: "bar", }, }, }, } tags := []string{"foo", "bar"} message := ms.NewMessage() message.SetFrom(from) message.SetRecipients(recipients) message.SetSubject(subject) message.SetHTML(html) message.SetText(text) message.SetSubstitutions(variables) message.SetTags(tags) res, _ := ms.Send(ctx, message) fmt.Printf(res.Header.Get("X-Message-Id")) }
from mailersend import emails

mailer = emails.NewEmail()

mail_body = {}

mail_from = {
    "name": "Your Name",
    "email": "your@domain.com",
}

recipients = [
    {
        "name": "Your Client",
        "email": "your@client.com",
    }
]

mailer.set_mail_from(mail_from, mail_body)
mailer.set_mail_to(recipients, mail_body)
mailer.set_subject("Hello!", mail_body)
mailer.set_html_content("

Greetings from the team, you got this message through MailerSend.

", mail_body) mailer.set_plaintext_content("Greetings from the team, you got this message through MailerSend.", mail_body) mailer.send(mail_body)
require "mailersend-ruby"

# Intialize the email class
ms_email = Mailersend::Email.new

# Add parameters
ms_email.add_recipients("email" => "your@client.com", "name" => "Your Client")
ms_email.add_recipients("email" => "your@client.com", "name" => "Your Client")
ms_email.add_from("email" => "your@domain.com", "name" => "Your Name")
ms_email.add_subject("Hello!")
ms_email.add_text("Greetings from the team, you got this message through MailerSend.")
ms_email.add_html("Greetings from the team, you got this message through MailerSend.")

# Send the email
ms_email.send

What our customers have to say

Well-designed service

"A well-designed, easy-to-use interface. Good template editor. Source code editing options are always available. Snappy mail delivery without any backlogs, API documentation is very clean and understandable."


Pekka G.

Amazing product and support

"MailerSend is extremely easy to use and super fast to set up. I was able to send the first email via the API in minutes. With the predefined templates and drag and drop editor, you're able to get started really quickly."


Tobias R.

Easily design HTML emails

"The service works great and has good documentation. The templates option is also great for both clients and developers alike. You can easily design HTML emails and fill in the information easily through the API."


James R.

Frequently asked questions

What is a dynamic email?

A dynamic email is a type of generic email that includes variables to personalize the content for each individual recipient. A simple example of this is using the {$name} variable to add the recipient’s name. 


How can I create dynamic email?

You can create a dynamic email by adding personalization variables into your API call. Learn how to use variables.

What is a dynamic email used for?

In transactional emails, dynamic emails are used to send account or transaction-specific content (such as account details, password reset link or order confirmation) to recipients. Dynamic emails can also be used to personalize messaging in order to build relationships and increase engagement, for example, by translating strings of text and adjusting it to the recipient’s locale.

What is the difference between a dynamic template and a responsive template?

A dynamic template is populated with personalization variables which display different content to recipients based on their personal data, interests and account activity. Responsive email templates automatically adapt to different devices and screen sizes. All emails created with MailerSend’s template builders are natively responsive.

More features to explore

MailerSend is packed full of features that help you save time and grow your business.

Start collaborating on transactional emails now

Try MailerSend for free: Design your templates and send up to 100 emails with a trial domain. Add your own domain to get 3,000 emails/month free and start sending.