SMTP
SMTP Integration
Send emails using SMTP without the need for any external libraries or dependencies. Connect seamlessly with your existing tools and frameworks.
SMTP Credentials
Use these credentials to connect any SMTP-compatible application to Unosend:
| Host | smtp.unosend.co |
| Port | 465 (SSL) or 587 (TLS) |
| Username | un_xxxx@unosend.co (Your API Key prefix) |
| Password | Your full API Key (un_xxxx...) |
Tip: You can find your SMTP credentials in Settings → SMTP or create a new API key in API Keys.
Connection Security
SMTPS (Implicit TLS)
Immediately connects via SSL/TLS. Recommended for most applications.
Port 465Port 2465
STARTTLS (Explicit TLS)
Upgrades an insecure connection to secure. Use when port 465 is blocked.
Port 587Port 25Port 2587
Quick Start Examples
Nodemailer (Node.js)
send-email.js
import nodemailer from 'nodemailer';
const transporter = nodemailer.createTransport({
host: 'smtp.unosend.co',
port: 465,
secure: true, // true for 465, false for other ports
auth: {
user: 'un_xxxx@unosend.co', // Your API key prefix @unosend.co
pass: 'un_xxxx...', // Your full API key
},
});
async function sendEmail() {
const info = await transporter.sendMail({
from: 'hello@yourdomain.com',
to: 'user@example.com',
subject: 'Hello from Unosend!',
html: '<h1>It works!</h1>',
});
console.log('Message sent:', info.messageId);
}
sendEmail();Python (smtplib)
send_email.py
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
smtp_host = "smtp.unosend.co"
smtp_port = 465
smtp_user = "un_xxxx@unosend.co" # Your API key prefix @unosend.co
smtp_pass = "un_xxxx..." # Your full API key
msg = MIMEMultipart()
msg['From'] = 'hello@yourdomain.com'
msg['To'] = 'user@example.com'
msg['Subject'] = 'Hello from Unosend!'
body = '<h1>It works!</h1>'
msg.attach(MIMEText(body, 'html'))
with smtplib.SMTP_SSL(smtp_host, smtp_port) as server:
server.login(smtp_user, smtp_pass)
server.send_message(msg)
print('Email sent successfully!')Laravel (.env)
.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.unosend.co
MAIL_PORT=465
MAIL_USERNAME=un_xxxx@unosend.co # Your API key prefix @unosend.co
MAIL_PASSWORD=un_xxxx... # Your full API key
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=hello@yourdomain.com
MAIL_FROM_NAME="${APP_NAME}"Django (settings.py)
settings.py
# Email configuration
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.unosend.co'
EMAIL_PORT = 465
EMAIL_USE_SSL = True
EMAIL_HOST_USER = 'un_xxxx@unosend.co' # Your API key prefix @unosend.co
EMAIL_HOST_PASSWORD = 'un_xxxx...' # Your full API key
DEFAULT_FROM_EMAIL = 'hello@yourdomain.com'Ruby on Rails (environment.rb)
config/environments/production.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.unosend.co',
port: 465,
user_name: 'un_xxxx@unosend.co', # Your API key prefix @unosend.co
password: 'un_xxxx...', # Your full API key
authentication: :plain,
ssl: true
}Supabase
Configure in your Supabase project under Authentication → Email Templates → SMTP Settings:
Supabase SMTP Settings
Host: smtp.unosend.co
Port: 465
Username: un_xxxx@unosend.co (Your API key prefix @unosend.co)
Password: un_xxxx... (Your full API key)
Sender email: hello@yourdomain.comSupported Integrations
Unosend SMTP works with any application that supports SMTP:
Nodemailer
Laravel
Django
Rails
Supabase
WordPress
NextAuth
Auth0
Strapi
Ghost
Discourse
GitLab