SMTP Relay
Use YourSend as an SMTP relay for legacy applications that can't use REST APIs.
Overview
The YourSend SMTP relay lets you send emails by pointing your SMTP settings to our servers. This is ideal for legacy apps, CMS platforms, or any system that supports SMTP but not REST APIs.
SMTP Credentials
| Setting | Value |
|---|---|
| Host | smtp.yoursend.dev |
| Port | 587 (STARTTLS) or 465 (SSL) |
| Username | Your API key (ys_live_...) |
| Password | Your API key (same as username) |
| Encryption | TLS |
Nodemailer Example
smtp-send.ts
import nodemailer from 'nodemailer';
const transporter = nodemailer.createTransport({
host: 'smtp.yoursend.dev',
port: 587,
secure: false,
auth: {
user: process.env.YOURSEND_API_KEY,
pass: process.env.YOURSEND_API_KEY,
},
});
await transporter.sendMail({
from: 'hello@yourcompany.com',
to: 'user@example.com',
subject: 'Hello via SMTP',
html: '<h1>Sent via SMTP relay!</h1>',
});Laravel / PHP
.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.yoursend.dev
MAIL_PORT=587
MAIL_USERNAME=ys_live_...
MAIL_PASSWORD=ys_live_...
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello@yourcompany.com
MAIL_FROM_NAME="YourApp"Django / Python
settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.yoursend.dev'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'ys_live_...'
EMAIL_HOST_PASSWORD = 'ys_live_...'
DEFAULT_FROM_EMAIL = 'hello@yourcompany.com'