Documentation

Everything you need to start sending email.

Quickstart

1. Sign up and add your domain

Create an account, then add your sending domain from the dashboard. We'll provide DNS records (DKIM and SPF) to add to your domain's DNS settings. Once verified, you're ready to send.

2. Get your credentials

Your SMTP credentials and API key are available in the dashboard. You'll need these to authenticate when sending email.

3a. Send via SMTP

Configure your application's SMTP settings with the following:

SMTP Host:     smtp.mailertogo.com
SMTP Port:     587 (STARTTLS) or 465 (SSL)
Username:      Your SMTP username (from dashboard)
Password:      Your SMTP password (from dashboard)

Most frameworks have built-in SMTP support:

Rails

# config/environments/production.rb
config.action_mailer.smtp_settings = {
  address:         ENV["MAILERTOGO_SMTP_HOST"],
  port:            587,
  user_name:       ENV["MAILERTOGO_SMTP_USER"],
  password:        ENV["MAILERTOGO_SMTP_PASSWORD"],
  authentication:  :plain,
  enable_starttls: true
}

Django

# settings.py
EMAIL_HOST = os.environ.get("MAILERTOGO_SMTP_HOST")
EMAIL_PORT = 587
EMAIL_HOST_USER = os.environ.get("MAILERTOGO_SMTP_USER")
EMAIL_HOST_PASSWORD = os.environ.get("MAILERTOGO_SMTP_PASSWORD")
EMAIL_USE_TLS = True

Node.js (Nodemailer)

const nodemailer = require("nodemailer");

const transport = nodemailer.createTransport({
  host: process.env.MAILERTOGO_SMTP_HOST,
  port: 587,
  auth: {
    user: process.env.MAILERTOGO_SMTP_USER,
    pass: process.env.MAILERTOGO_SMTP_PASSWORD,
  },
});

Laravel

# .env
MAIL_MAILER=smtp
MAIL_HOST="${MAILERTOGO_SMTP_HOST}"
MAIL_PORT=587
MAIL_USERNAME="${MAILERTOGO_SMTP_USER}"
MAIL_PASSWORD="${MAILERTOGO_SMTP_PASSWORD}"
MAIL_ENCRYPTION=tls

PHP (PHPMailer)

// composer require phpmailer/phpmailer
use PHPMailer\PHPMailer\PHPMailer;

$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host       = getenv("MAILERTOGO_SMTP_HOST");
$mail->Port       = 587;
$mail->SMTPAuth   = true;
$mail->Username   = getenv("MAILERTOGO_SMTP_USER");
$mail->Password   = getenv("MAILERTOGO_SMTP_PASSWORD");
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;

$mail->setFrom("you@your-domain.com", "Your App");
$mail->addAddress("recipient@example.com");
$mail->Subject = "Hello from Mailer To Go";
$mail->Body    = "Sent via SMTP.";
$mail->send();

Go (net/smtp)

package main

import (
    "net/smtp"
    "os"
)

func main() {
    host := os.Getenv("MAILERTOGO_SMTP_HOST")
    auth := smtp.PlainAuth("",
        os.Getenv("MAILERTOGO_SMTP_USER"),
        os.Getenv("MAILERTOGO_SMTP_PASSWORD"), host)

    msg := []byte("To: recipient@example.com\r\n" +
        "Subject: Hello from Mailer To Go\r\n\r\n" +
        "Sent via SMTP.\r\n")

    smtp.SendMail(host+":587", auth, "you@your-domain.com",
        []string{"recipient@example.com"}, msg)
}

Next.js (App Router, Nodemailer)

// app/api/send/route.js
import nodemailer from "nodemailer";

const transport = nodemailer.createTransport({
  host: process.env.MAILERTOGO_SMTP_HOST,
  port: 587,
  auth: {
    user: process.env.MAILERTOGO_SMTP_USER,
    pass: process.env.MAILERTOGO_SMTP_PASSWORD,
  },
});

export async function POST(req) {
  const { to, subject, text } = await req.json();
  await transport.sendMail({ from: "you@your-domain.com", to, subject, text });
  return Response.json({ ok: true });
}

3b. Send via REST API Coming soon

A JSON REST API is in development. Today, send via SMTP (above); this is the planned request shape:

curl -X POST https://api.mailertogo.com/api/v1/emails \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "you@yourdomain.com",
    "to": "user@example.com",
    "subject": "Hello",
    "html": "<p>Your email body here.</p>"
  }'

This endpoint is not yet live — send via SMTP for now. We'll announce the REST API here when it ships.

Domain setup

DNS records

To send from your own domain, add the DNS records shown in your dashboard:

  • DKIM — A TXT record that lets recipients verify your emails are authentic
  • SPF — A TXT record that authorizes our servers to send on your domain's behalf

DNS changes can take up to 48 hours to propagate, though most complete within minutes. The dashboard will show verification status for each record.

Webhooks

Configure webhook URLs in your dashboard to receive real-time notifications for email events:

  • delivered — Email was accepted by the recipient's mail server
  • bounced — Email could not be delivered
  • opened — Recipient opened the email (when tracking is enabled)
  • clicked — Recipient clicked a link (when tracking is enabled)

Webhook payloads are sent as JSON POST requests. We retry failed deliveries with exponential backoff.

Platform integrations

Heroku

Mailer To Go is available as a Heroku add-on. Provision it from the Heroku Elements Marketplace, and your SMTP credentials will be set as config vars automatically.

Build.io

Mailer To Go is also available on Build.io. Provision it from your Build.io dashboard for automatic configuration.

Support

Have questions? Email us at support@mailertogo.com. Check our status page for service availability.