Sign up for a free account
Email API simplified
Fast, secure email delivery you can integrate in minutes with a reliable REST API and official SDKs.

An email API with SDKS for your favorite languages
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.
"
}'
import { MailerSend, EmailParams, Sender, Recipient } from "mailersend";
const mailerSend = new MailerSend({
api_key: "key",
});
const sentFrom = new Sender("you@yourdomain.com", "Your name");
const recipients = [
new Recipient("your@client.com", "Your Client")
];
const emailParams = new EmailParams()
.setFrom(sentFrom)
.setTo(recipients)
.setReplyTo(sentFrom)
.setSubject("This is a Subject")
.setHtml("This is the HTML content")
.setText("This is the text content");
await mailerSend.email.send(emailParams);
$mailersend = new MailerSend();
$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);
php artisan make:mail ExampleEmail
Mail::to('you@client.com')->send(new ExampleEmail());
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
package main
import (
"context"
"os"
"fmt"
"time"
"github.com/mailersend/mailersend-go"
)
func main() {
// Create an instance of the mailersend client
ms := mailersend.NewMailersend(os.Getenv("MAILERSEND_API_KEY"))
ctx := context.Background()
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
subject := "Subject"
text := "This is the text content"
html := "This is the HTML content
"
from := mailersend.From{
Name: "Your Name",
Email: "your@domain.com",
}
recipients := []mailersend.Recipient{
{
Name: "Your Client",
Email: "your@client.com",
},
}
// Send in 5 minute
sendAt := time.Now().Add(time.Minute * 5).Unix()
tags := []string{"foo", "bar"}
message := ms.Email.NewMessage()
message.SetFrom(from)
message.SetRecipients(recipients)
message.SetSubject(subject)
message.SetHTML(html)
message.SetText(text)
message.SetTags(tags)
message.SetSendAt(sendAt)
message.SetInReplyTo("client-id")
res, _ := ms.Email.Send(ctx, message)
fmt.Printf(res.Header.Get("X-Message-Id"))
}
import com.mailersend.sdk.Email;
import com.mailersend.sdk.MailerSend;
import com.mailersend.sdk.MailerSendResponse;
import com.mailersend.sdk.exceptions.MailerSendException;
public void sendEmail() {
Email email = new Email();
email.setFrom("name", "your email");
email.addRecipient("name", "your@recipient.com");
// you can also add multiple recipients by calling addRecipient again
email.addRecipient("name 2", "your@recipient2.com");
// there's also a recipient object you can use
Recipient recipient = new Recipient("name", "your@recipient3.com");
email.AddRecipient(recipient);
email.setSubject("Email subject");
email.setPlain("This is the text content");
email.setHtml("This is the HTML content
");
MailerSend ms = new MailerSend();
ms.setToken("Your API token");
try {
MailerSendResponse response = ms.emails().send(email);
System.out.println(response.messageId);
} catch (MailerSendException e) {
e.printStackTrace();
}
}
Monitoring & debugging made easy
-
API and SMTP logs
Have visibility into every request and filter logs to quickly find what you’re looking for. See the full request and response plus the endpoint, IP address and user agent. -
Email analytics and activity
Catch issues faster with real-time activity for every email you send. Create custom analytics reports for your domain or whole account. -
Webhook events
Get webhook notifications about email delivery, spam complaints, bounces and more so you can fix issues before they impact the user experience.



Integrations

Process incoming messages
Use our inbound routing feature to parse incoming emails to your app. Enable email-based functionality, optimize support workflows, and let users post replies, comments and messages.

Emails that make it to the inbox
We built a powerful, secure infrastructure that’s backed by our awesome team of email deliverability experts. Reputation management, blocklist monitoring and premium IPs ensure your messages skip the spam folder and reach recipients.
There's an endpoint for that
Send order confirmations, password resets, OTPs and more.
/bulk-email
Send service updates, event reminders, and account summaries.
/activity
Create custom dashboards or integrate activity metrics into other apps.
/analytics
Automate reports, pull data into internal tools, or trigger conditional logic.
/domains
Automate domain setup and get an overview of active domains.
/inbound
Manage inbound routes and create user-specific routes on signup.
/recipients
Share recipient data across tools to sync contacts and manage suppressions.
/templates
Send with email templates that look professional and contain dynamic content.
/email-verification
Configure forms to perform real-time email validation or verify a whole list.
/sms
Send appointment reminders, 2FA messages, shipping updates and more.
/smtp-users
Programmatically create SMTP users during environment setup.
View more endpoints

Build, personalize, send
Save time on template creation with 3 email builders: drag & drop, HTML, and rich-text. Make a single template work for thousands of recipients with personalization variables.

Automated DNS configuration
Enter your domain and we’ll do the rest. Our auto DNS configuration will detect your provider and automatically configure SPF, DKIM and DMARC authentication records to verify your domain.

Protect your sender reputation with email verification
Use advanced email verification and the email validation API to clean recipient lists and optimize web forms to validate emails at the point of collection.
Here’s what developers say about MailerSend
Frequently asked questions
What is MailerSend?
MailerSend is a transactional messaging service provider that offers a powerful email sending API and SMTP relay, built so that developers can integrate transactional email sending into their stack quickly and easily.
Do you also offer an SMS API?
Yes! Our easy-to-use SMS API allows you to send high-volume, toll-free SMS within North America. Availability in more regions is on the way.
Can I send email marketing campaigns through MailerSend?
While you could send marketing emails with the email API, 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. We offer SSO capability with MailerLite, so you can connect and use a single account for both your marketing emails and transactional emails while still keeping them separate.
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 Starter plan is available for up to 1,000,000 emails/month, with additional emails charged at decremental rates starting at $0.95/1,000. In comparison, the Professional plan is available for up to 2,000,000 emails/month with the charge for additional emails starting at $0.80/1,000. If you need more than 2,000,000 emails, you can talk to us about a custom Enterprise plan.
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.
Can I send emails via SMTP (Simple Mail Transfer Protocol)?
Yes, we have a plugin available if you wish to send emails through our SMTP service, although we recommend using the email API for more advanced functionality.
Explore all features
Powerful RESTful API service

Start sending and tracking your emails with our easy API integration process and clean documentation.
Email verification

Verify a single email address or upload an entire email list to verify in bulk.
Webhooks

Get notified of email events to trigger automatic reactions.
Advanced email analytics

View your email activity in real-time to gain insights and make adjustments when needed.
Email inbound processing

Automatically parse incoming emails. Inbound email routes enable MailerSend to receive emails on your behalf, integrating them into your application.
Dynamic email templates

Build one-to-one customer relationships on a mass scale using a single email template.
And much more to deliver, every single time
Integrate emails in your stack now
Use our email API to start sending emails from your apps. Get started with 3,000 free emails per month! Includes 24/7 help from a friendly and dedicated support team.
Send an email from the trial domain
Try out the features & check your activity