API de e-mail versátil para devs - MailerSend

API de e-mail versátil para devs

Nossa robusta API RESTful foi feita pensando em você. Integre rapidamente o envio de e-mail com nossas bibliotecas oficiais e autentique solicitações de API com tokens.

Teste grátis

Integração de API de e-mail rápida e fácil

O MailerSend funciona perfeitamente no seu stack, com bibliotecas para suas linguagens de programação favoritas, como PHP, Node.js, Golang, Python, Ruby, Java e Laravel, e uma extensa documentação de API.

Leia nossa documentação de API

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 MailerSendClient, EmailBuilder

ms = MailerSendClient()

email = (EmailBuilder()
         .from_email("sender@domain.com", "Your Name")
         .to_many([{"email": "recipient@domain.com", "name": "Recipient"}])
         .subject("Hello from MailerSend!")
         .html("Hello World!")
         .text("Hello World!")
         .build())

response = ms.emails.send(email)
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

E-mails disparados dos seus apps

Dispare e-mails em poucos minutos com o serviço de API de e-mail da MailerSend e acesse funcionalidades avançadas, como personalização, envio em massa, anexos e muito mais.

Colaboração autônoma em equipe

Conte com a colaboração de toda a sua equipe: conceda permissões específicas ou atribua funções para que cada pessoa possa criar modelos sem que você tenha que lidar com o design.

Roteamento de entrada a cargo dos usuários

O roteamento de entrada é fácil de configurar e permite que a MailerSend analise os e-mails recebidos em seu app para que os usuários possam publicar respostas, postar comentários e disparar e-mails na maior tranquilidade.

Notificações em tempo real com webhooks

Otimize os fluxos de trabalho dos usuários com notificações instantâneas sobre eventos de e-mail transacionais. Receba atualizações sobre entrega de e-mail, reclamações de spam, devoluções e muito mais sem precisar consultar a API o tempo todo.

Proteja seu domínio de envio

Proteja sua reputação de remetente com provedores de caixa de entrada usando nossos protocolos de segurança SPF, DKIM e DMARC. Autentique o conteúdo das mensagens para melhorar a entregabilidade dos e-mails e mantê-los longe da pasta de spam.

Experiência de entrega comprovada

Temos uma década de experiência em entrega de e-mails. Com a MailerSend, você envia e-mail transacionais na certeza de que eles chegarão à caixa de entrada dos destinatários.

O que os devs falam sobre a MailerSend

Produto incrível, atendimento sensacional

"A MailerSend é absurdamente fácil de usar e rápido de configurar. Eu enviei o primeiro e-mail pela API em minutos. Isso sem falar no atendimento, que se destaca por ser tão bom."

Tobias R.

É fácil enviar pela API

"É bem fácil criar modelos novos e enviá-los pela API. Não tivemos nenhum problema em receber e-mails até agora, e o atendimento é fora de série!"

Markus G.

Solução para desenvolvedores e designers

"Os devs não terão dificuldades de usar a API, bem como os designers com os modelos de e-mail. Os devs não precisam quebrar a cabeça com o design e os designers não precisam se preocupar com a programação. Um sonho!"

Raphael A.

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.](/content/features/email-delivery/index.html) \ \ Transactional emails \ \ Intuitively-designed tools allow anyone to contribute, while an advanced infrastructure lets you scale fast.](/content/features/transactional-emails/index.html) \ \ SMTP relay \ \ Use Simple Mail Transfer Protocol when you want to quickly send emails using a reliable Internet standard.](/content/features/smtp-relay/index.html) \ \ Email API \ \ Start sending and tracking your emails with our easy API integration process and clean documentation.](/content/features/email-api/index.html) \ \ Dynamic email templates \ \ Build one-to-one customer relationships on a mass scale using a single email template.](/content/features/dynamic-email-templates/index.html) \ \ Email verification \ \ Verify a single email address or upload an entire email list to verify in bulk.](/content/features/email-verification-tool/index.html) \ \ Email address validation API \ \ Keep your recipient list clean and maintain great deliverability by automatically verifying incoming email addresses with the email address validation API.](/content/features/email-address-validation-api/index.html) \ \ Mailerlite](/content/features/marketing-emails/index.html)

Control your sendings

\ \ Webhooks \ \ Get notified as email events happen so your integration can automatically trigger reactions.](/content/features/webhooks/index.html) \ \ Advanced email tracking \ \ Every email is a learning experience. Monitor your email performance to find what works best.](/content/features/email-tracking/index.html) \ \ Manage the unsubscribe page \ \ Whether people are unsubscribing, give them a compelling reason to stay.](/content/features/manage-unsubscribe-page-builder/index.html) \ \ Email suppression list management \ \ Protect your sending reputation by adding email addresses and domains that you should not send to.](/content/features/suppression-list-management/index.html) \ \ Activity and performance logs \ \ Easy access to detailed API and SMTP activity data and template error logs.](/content/features/logs/index.html)

Track the results

\ \ Email activity \ \ Search your activity feed to troubleshoot sending and understand the behavior of your recipients.](/content/features/email-activity/index.html) \ \ Email analytics \ \ Access a wide range of metrics to learn how to improve email deliverability and engagement.](/content/features/email-analytics/index.html)

Create emails

\ \ Custom HTML email builder \ \ Interested in writing your own HTML code? Our HTML email template editor gives you the flexibility to build exactly what you want.](/content/features/html-email-template-builder/index.html) \ \ Drag & drop email template builder \ \ Our drag & drop email editor empowers you to create professionally-designed transactional emails.](/content/features/email-template-builder/index.html) \ \ Rich-text email editor \ \ Create plain text emails with the formatting capabilities of HTML. Add links, images, bullet points and style text with ease.](/content/features/rich-text-email-editor/index.html) \ \ Email split testing \ \ Email split testing will improve engagement with your transactional emails by helping you learn what your customers want more.](/content/features/email-split-testing/index.html) \ \ 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.](/content/features/survey-emails/index.html)

Control your account

\ \ User management \ \ Invite your team members to collaborate on projects by assigning roles and granting permissions.](/content/features/user-management/index.html) \ \ File manager \ \ Streamline your workflow by organizing and keeping all your files in one place in the cloud.](/content/features/manage-files/index.html) \ \ Multiple domains \ \ Use multiple domains to manage different brands or products with one MailerSend account.](/content/features/multiple-domains/index.html) \ \ Dedicated IP \ \ Take control of your sending reputation with your own dedicated IP address and optimize your sendings for improved deliverability.](/content/features/dedicated-ip-email/index.html) \ \ Email MCP server \ \ Connect your AI tool to the MailerSend email MCP server to effortlessly send, track, and manage your transactional emails.](/content/features/mcp/index.html) \ \ DMARC monitoring \ \ Get insights into your domain’s email sending activity so you can identify authentication issues and unauthorized senders, and protect your domain reputation.](/content/features/dmarc-monitoring/index.html) \ \ Blocklist monitoring \ \ Set up automated blocklist checks to catch listed domains and IPs in real-time, so you can get delisted quickly before sender reputation is affected.](/content/features/blocklist-monitoring/index.html)

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.](/content/features/inbound-emails/index.html)

Transactional SMS

\ \ WhatsApp transactional messaging API \ \ Send critical transactional notifications via the official WhatsApp Business API.](/content/features/whatsapp/index.html)

Não deixe os e-mails fora da sua stack

Envie e-mails direto dos seus apps com nossa API de e-mail. Comece com 500 e-mails grátis por mês e envie mais por apenas US$7/mês!

Assine grátis