Ihre Anwendung oder Ihr Tool spricht nur SMTP? Richten Sie einen beliebigen SMTP-Client auf toSend. Die Nachricht läuft durch dieselbe Pipeline: verifizierte Domains, Sperren, Protokolle und Auswertungen funktionieren genauso.
Verbindungsdaten
| Einstellung | Wert |
|---|---|
| Host | smtp.tosend.com |
| Port | 465 (SSL/TLS) oder 587 (STARTTLS) |
| Benutzername | beliebiger Wert (z. B. tosend), wird ignoriert |
| Passwort | Ihr toSend-API-Schlüssel |
Dieselben Angaben stehen im Dashboard unter Settings → SMTP.
Voraussetzungen
- Einen API-Schlüssel legen Sie unter API Keys im Dashboard an. Der Schlüssel ist das SMTP-Passwort. Der Benutzername kann beliebig sein. Verwenden Sie einen Versandschlüssel (
tsend_...). Admin-Schlüssel (tsend_admin_...) lehnt SMTP ab. - Eine verifizierte Versanddomain: Die Adresse in
Frommuss eine Domain verwenden, die Sie verifiziert haben. Sonst wird die Nachricht abgelehnt.
Kurzer Test
Mit swaks:
swaks --server smtp.tosend.com --port 465 --tlsc \
--auth LOGIN --auth-user tosend --auth-password YOUR_API_KEY \
--from you@your-verified-domain.com --to test@example.com \
--header "Subject: toSend SMTP test" --body "It works!"
Beispiele
Nodemailer (Node.js)
import nodemailer from "nodemailer";
const transporter = nodemailer.createTransport({
host: "smtp.tosend.com",
port: 465,
secure: true, // true for 465, false for 587
auth: {
user: "tosend",
pass: process.env.TOSEND_API_KEY,
},
});
await transporter.sendMail({
from: "you@your-verified-domain.com",
to: "dest@example.com",
subject: "Hello from toSend",
html: "<p>Sent over SMTP.</p>",
});
PHP (PHPMailer)
$mail = new PHPMailer\PHPMailer\PHPMailer(true);
$mail->isSMTP();
$mail->Host = 'smtp.tosend.com';
$mail->SMTPAuth = true;
$mail->Username = 'tosend';
$mail->Password = getenv('TOSEND_API_KEY');
$mail->SMTPSecure = PHPMailer\PHPMailer\PHPMailer::ENCRYPTION_SMTPS; // 465
$mail->Port = 465;
$mail->setFrom('you@your-verified-domain.com');
$mail->addAddress('dest@example.com');
$mail->Subject = 'Hello from toSend';
$mail->Body = 'Sent over SMTP.';
$mail->send();
Python (smtplib)
import os, smtplib
from email.message import EmailMessage
msg = EmailMessage()
msg["From"] = "you@your-verified-domain.com"
msg["To"] = "dest@example.com"
msg["Subject"] = "Hello from toSend"
msg.set_content("Sent over SMTP.")
with smtplib.SMTP_SSL("smtp.tosend.com", 465) as s:
s.login("tosend", os.environ["TOSEND_API_KEY"])
s.send_message(msg)
Supabase
Öffnen Sie im Supabase-Projekt Authentication → Emails → SMTP Settings, aktivieren Sie Custom SMTP und tragen Sie ein:
- Sender email: eine Adresse Ihrer verifizierten Domain
- Host:
smtp.tosend.com - Port:
587 - Username:
tosend - Password: Ihr toSend-API-Schlüssel
Supabase schickt seine Authentifizierungsmails (Bestätigungen, Passwort-Resets, Magic Links) über diese Verbindung.
Fehlersuche
- Authentication failed: Prüfen Sie, ob das Passwort ein gültiger API-Schlüssel ist und der Schlüssel nicht widerrufen wurde.
- Message rejected / domain not allowed: Die Domain in
Frommuss in toSend verifiziert sein. - Connection times out: Manche Hoster sperren die ausgehenden Ports 465 und 587. Versuchen Sie die Ausweichports
2465(SSL/TLS) oder2587(STARTTLS), oder schreiben Sie dem Support. - The API can’t be reached from your network: Manche Netze sperren Cloudflare, und darüber läuft
api.tosend.com.smtp.tosend.comläuft außerhalb von Cloudflare, deshalb funktioniert SMTP aus diesen Netzen.