GET /v1/smtp

Retrieve SMTP relay credentials for your organization. Use these to send email from any SMTP-compatible application.

Get SMTP Credentials

Returns SMTP connection details. Your YourSend API key is used as the SMTP password. The From address must use a verified domain.

cURL
curl https://api.yoursend.dev/v1/smtp \
  -H "Authorization: Bearer ys_live_..."

Response

Response
{
  "host": "smtp.yoursend.dev",
  "port": 587,
  "security": "STARTTLS",
  "username": "yoursend",
  "password": "Your API key",
  "note": "Use your YourSend API key as the SMTP password. The From address must use a verified domain."
}

Using SMTP

Configure your application or mail client with these settings:

SettingValue
Hostsmtp.yoursend.dev
Port587
SecuritySTARTTLS
Usernameyoursend
PasswordYour API key (ys_live_...)
Node.js (Nodemailer)
import nodemailer from 'nodemailer';

const transport = nodemailer.createTransport({
  host: 'smtp.yoursend.dev',
  port: 587,
  secure: false,
  auth: {
    user: 'yoursend',
    pass: 'ys_live_...',
  },
});

await transport.sendMail({
  from: 'noreply@yourdomain.com',
  to: 'user@example.com',
  subject: 'Hello from SMTP',
  html: '<h1>Hello!</h1>',
});