Flexible email API service for developers
MailerSend’s powerful RESTful API service is built with you in mind. Start integrating email sending quickly with our official libraries, and authenticate API requests with tokens.
Quick and easy email API integration
MailerSend fits right into your stack with libraries for your favorite programming languages, including PHP, Node.js, Golang, Python, Ruby, Java and Laravel, plus comprehensive API documentation.
Read our API docscurl -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

Send emails from your apps
Start sending emails with MailerSend’s email API service in just a few minutes and get access to advanced functionality like personalization, bulk sending, attachments and more.

Let your team handle the rest
Allow your whole team to contribute by granting them specific permissions or assigning them roles so they can create templates without you having to handle the design.

Allow users to interact with inbound routing
Easy to configure inbound routing enables MailerSend to parse incoming emails to your app, so users can effortlessly post replies, comments and emails.

Get real-time notifications with webhooks
Optimize users’ workflows with instant notifications about transactional email events. Get updates about email delivery, spam complaints, bounces and more without constantly polling the API.

Safeguard your sending domain
Protect your sender reputation with inbox providers using our SPF, DKIM and DMARC security protocols. Authenticate your email content to improve your email deliverability and keep out of the spam folder.

Proven experience that delivers
MailerSend is backed by a decade of email delivery experience, so you can send transactional email messages knowing that they will reach the inbox.
Here’s what developers say about MailerSend
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. What's really worth mentioning is the outstanding customer support."
Easy to send via API
"It is quite easy to create new templates and send them through the API. Up until now, we didn't have any problems with receiving emails. Plus, the customer support is great!"
For developers and designers
"Super easy to use API for devs. Easy to use mail templating for designers. Developers don't need to do design, and designers don't need to code as well. It's awesome."
Frequently asked questions
What is MailerSend?
MailerSend is a transactional messaging service provider that offers a powerful email API, built so that developers can integrate transactional email sending into their stack quickly and easily.
Do you also offer an SMS API?
An SMS API is on the way! It’s on our roadmap and set to be available shortly.
Can I send email marketing campaigns through MailerSend?
While you could send marketing emails, the MailerSend platform is built for transactional emailing. To get the best performance and deliverability for both marketing and transactional email campaigns, we recommend keeping them separate.
What options are available for editing emails?
MailerSend includes three different template builders for users of all skills. The rich-text email editor and drag & drop template builder editors allow users to create professional templates without the need for coding, while the custom HTML template builder offers added flexibility for those wanting to write their own code.
Does MailerSend validate email addresses?
We’re working on an email validation feature, which will be available soon, so that you can verify individual email addresses or your entire list in bulk.
How does MailerSend pricing work?
Pricing is based on the number of emails you send. Our free plan includes 3,000 emails, with additional emails charged on a pay as you go basis at a rate of $1.00/1,000. Our cost-effective Premium plan is available for up to 2,500,000 emails/month, with additional emails charged at decremental rates starting at $0.90/1,000. If you need more than 2,500,000 emails, you can talk to us about a custom Enterprise plan.
Can I send emails via SMTP (Simple Mail Transfer Protocol)?
Yes, we have a plugin available if you wish to send emails through SMTP, although we recommend using the email API for more advanced functionality.
Do you provide email templates?
MailerSend has a rich gallery of free, responsive transactional email templates that have been professionally designed for many use cases. You can simply choose a template and make it your own.
Can I get a dedicated IP address?
Dedicated IPs are available for high-volume senders. Get in touch with us to find out if a dedicated IP is right for you.
More features to explore
MailerSend is packed full of features that help you save time and grow your business.
Send emails
Email delivery
Enjoy the flexibility of sending a few emails or scaling quickly to send a few million.
Transactional emails
Intuitively-designed tools allow anyone to contribute, while an advanced infrastructure lets you scale fast.
SMTP relay
Use Simple Mail Transfer Protocol when you want to quickly send emails using a reliable Internet standard.
Email API
Start sending and tracking your emails with our easy API integration process and clean documentation.
Dynamic email templates
Build one-to-one customer relationships on a mass scale using a single email template.
Email verification
Verify a single email address or upload an entire email list to verify in bulk.
Control your sendings
Webhooks
Get notified as email events happen so your integration can automatically trigger reactions.
Advanced email tracking
Every email is a learning experience. Monitor your email performance to find what works best.
Manage the unsubscribe page
Whether people are unsubscribing, give them a compelling reason to stay.
Suppression list management
Protect your sending reputation by adding email addresses and domains that you should not send to.
Track the results
Create emails
Custom HTML template builder
Interested in writing your own HTML code? Our HTML email template editor gives you the flexibility to build exactly what you want.
Drag & drop email template builder
Our drag & drop email editor empowers you to create professionally-designed transactional emails.
Rich-text email editor
Create plain text emails with the formatting capabilities of HTML. Add links, images, bullet points and style text with ease.
Email split testing
Email split testing will improve engagement with your transactional emails by helping you learn what your customers want more.
Control your account
User management
Invite your team members to collaborate on projects by assigning roles and granting permissions.
File manager
Streamline your workflow by organizing and keeping all your files in one place in the cloud.
Multiple domains
Use multiple domains to manage different brands or products with one MailerSend account.
Dedicated IP
Take control of your sending reputation with your own dedicated IP address and optimize your sendings for improved deliverability.
MailerSend iOS app
Access email activity, domain settings, and analytics on the go with MailerSend iOS app.
Start conversations
Inbound email routing
Automatically parse incoming emails. Inbound email routes enable MailerSend to receive emails on your behalf, integrating them into your application.
Send surveys
Understand your customers and users on a deeper level and gain valuable insights to help you improve your product and customer experience with surveys.
Integrate emails in your stack now
Use our email API to start sending emails within your apps. Get started with 3,000 free emails per month! Includes 24/7 help from a friendly and dedicated support team.