Send email via SMTP
Send email through Samva's SMTP relay from any platform or language that speaks SMTP — no SDK required.
Send email via SMTP
Samva's SMTP relay at smtp.samva.app lets you send email from a platform or language that already speaks SMTP, without integrating the API or SDK. SMTP submissions route through the same delivery pipeline as API sends, so you keep the same tracking and deliverability.
SMTP is staged. The relay accepts connections and authenticates with your API key, but it is not yet accepting message submissions. Use the API or SDK to send email today; this guide describes the SMTP path so you can prepare your integration.
Email first. Samva is launching with email. SMS, WhatsApp, and voice are staged and will be documented as they ship.
Before you start
- A verified sending domain in Samva — see Verify your domain.
- A Samva API key, which you use as the SMTP password.
- A sender address (
From:) on your verified domain.
1. Use these connection settings
| Setting | Value |
|---|---|
| Host | smtp.samva.app |
| Port | 587 (STARTTLS, recommended) or 465 (SSL/TLS) |
| Username | samva |
| Password | Your Samva API key |
| Encryption | TLS required |
For the full configuration reference, including every supported port and option, see the SMTP reference.
2. Send from your language
Configure your SMTP client with the settings above, then send. Pick your language below.
import nodemailer from "nodemailer";
const transporter = nodemailer.createTransport({
host: "smtp.samva.app",
port: 587,
secure: false, // STARTTLS
auth: {
user: "samva",
pass: process.env.SAMVA_API_KEY,
},
});
await transporter.sendMail({
from: "you@yourdomain.com",
to: "recipient@example.com",
subject: "Hello from Samva",
html: "<h1>Hello!</h1><p>Sent via SMTP relay.</p>",
});import os
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
msg = MIMEMultipart("alternative")
msg["Subject"] = "Hello from Samva"
msg["From"] = "you@yourdomain.com"
msg["To"] = "recipient@example.com"
html = "<h1>Hello!</h1><p>Sent via SMTP relay.</p>"
msg.attach(MIMEText(html, "html"))
with smtplib.SMTP("smtp.samva.app", 587) as server:
server.starttls()
server.login("samva", os.environ["SAMVA_API_KEY"])
server.send_message(msg)use PHPMailer\PHPMailer\PHPMailer;
$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host = 'smtp.samva.app';
$mail->SMTPAuth = true;
$mail->Username = 'samva';
$mail->Password = getenv('SAMVA_API_KEY');
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;
$mail->setFrom('you@yourdomain.com');
$mail->addAddress('recipient@example.com');
$mail->Subject = 'Hello from Samva';
$mail->isHTML(true);
$mail->Body = '<h1>Hello!</h1><p>Sent via SMTP relay.</p>';
$mail->send();require 'net/smtp'
message = <<~MSG
From: you@yourdomain.com
To: recipient@example.com
Subject: Hello from Samva
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
<h1>Hello!</h1><p>Sent via SMTP relay.</p>
MSG
smtp = Net::SMTP.new('smtp.samva.app', 587)
smtp.enable_starttls
smtp.start('smtp.samva.app', 'samva', ENV['SAMVA_API_KEY'], :plain) do |s|
s.send_message(message, 'you@yourdomain.com', 'recipient@example.com')
endpackage main
import (
"net/smtp"
"os"
"strings"
)
func main() {
auth := smtp.PlainAuth("", "samva", os.Getenv("SAMVA_API_KEY"), "smtp.samva.app")
to := []string{"recipient@example.com"}
msg := strings.Join([]string{
"From: you@yourdomain.com",
"To: recipient@example.com",
"Subject: Hello from Samva",
"MIME-Version: 1.0",
"Content-Type: text/html; charset=UTF-8",
"",
"<h1>Hello!</h1><p>Sent via SMTP relay.</p>",
}, "\r\n")
smtp.SendMail("smtp.samva.app:587", auth, "you@yourdomain.com", to, []byte(msg))
}3. Confirm delivery
Once SMTP submissions are enabled, messages sent over the relay appear in your Samva dashboard with their delivery events tracked the same way as API sends. Until then, the relay authenticates your API key but returns an error on the message body — send through the API or SDK to deliver email today.
Connecting a third-party platform
Sending from a hosted platform like Auth0, Supabase, or WordPress? Those typically ask for the same host, port, username, and password fields shown above. See SMTP platform setup for platform-specific steps.