SMTP Relay
Send emails via SMTP using your Transmit API key. Works with any SMTP-compatible application.
Send emails via standard SMTP protocol using your Transmit API key. Perfect for legacy apps, WordPress, Cronicle, or any software with SMTP support.
Configuration
Host: smtp.xmit.sh
Port: 587
Username: api
Password: YOUR_API_KEY
Security: STARTTLSUse your Transmit API key (starts with pm_live_ or pm_test_) as the SMTP password.
Quick Setup Examples
Nodemailer (Node.js)
const nodemailer = require('nodemailer');
const transporter = nodemailer.createTransport({
host: 'smtp.xmit.sh',
port: 587,
secure: false, // STARTTLS
auth: {
user: 'api',
pass: 'pm_live_xxxxx'
}
});
await transporter.sendMail({
from: 'hello@yourapp.com',
to: 'user@example.com',
subject: 'Welcome!',
html: '<h1>Welcome!</h1>'
});Python (smtplib)
import smtplib
from email.mime.text import MIMEText
msg = MIMEText('<h1>Welcome!</h1>', 'html')
msg['Subject'] = 'Welcome!'
msg['From'] = 'hello@yourapp.com'
msg['To'] = 'user@example.com'
with smtplib.SMTP('smtp.xmit.sh', 587) as server:
server.starttls()
server.login('api', 'pm_live_xxxxx')
server.send_message(msg)PHP (PHPMailer)
use PHPMailer\PHPMailer\PHPMailer;
$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host = 'smtp.xmit.sh';
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->Username = 'api';
$mail->Password = 'pm_live_xxxxx';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->setFrom('hello@yourapp.com');
$mail->addAddress('user@example.com');
$mail->Subject = 'Welcome!';
$mail->Body = '<h1>Welcome!</h1>';
$mail->send();WordPress
In your SMTP plugin (e.g., WP Mail SMTP):
| Setting | Value |
|---|---|
| SMTP Host | smtp.xmit.sh |
| SMTP Port | 587 |
| Encryption | TLS |
| Authentication | Yes |
| Username | api |
| Password | Your API key |
Cronicle
{
"smtp_hostname": "smtp.xmit.sh",
"smtp_port": 587,
"mail_options": {
"secure": false,
"auth": {
"user": "api",
"pass": "pm_live_xxxxx"
}
}
}Command Line (swaks)
swaks --to user@example.com \
--from hello@yourapp.com \
--server smtp.xmit.sh:587 \
--auth LOGIN \
--auth-user api \
--auth-password pm_live_xxxxx \
--tls \
--body "Hello from SMTP!"Features
- Full email support: HTML, plain text, attachments, CC, BCC, Reply-To
- TLS encryption: STARTTLS on port 587
- API key auth: Use your existing Transmit API key
- Same limits: Inherits your plan's email limits
Limits
| Limit | Value |
|---|---|
| Max recipients | 50 (to + cc + bcc) |
| Max attachment | 5 MB per file |
| Max message size | 10 MB total |
Troubleshooting
Connection refused
- Ensure port 587 is not blocked by your firewall
- Try
telnet smtp.xmit.sh 587to test connectivity
Authentication failed
- Verify your API key is correct and active
- Key must start with
pm_live_orpm_test_ - Check the key hasn't been revoked in Settings
TLS/SSL errors
- Use STARTTLS, not SSL/TLS
- Port 587 (not 465)
- Set
secure: falsein Nodemailer
Related
- Send Email — REST API for programmatic sending
- Templates — Create reusable templates
- Webhooks — Track delivery events
API Reference
Send transactional emails programmatically. API endpoints, authentication, request/response formats, and code examples.
Webhooks & Events
Receive real-time HTTP notifications for email events. Configure endpoints, verify signatures, and track deliveries, opens, clicks, bounces, and complaints.