SMTP
SMTP is the compatibility path for systems that already know how to hand mail to a relay. Use it for legacy applications, CMS plugins, CRMs, and servers where changing application code is harder than changing mail settings.
Relay settings
Host: smtp.mtrgt.net
Port: 587
Encryption: STARTTLS
Username: smtp_mt_injection
Password: <api_key with Send via SMTP permission>
The username is fixed. The password is a Mailtarget API key with the SMTP permission scope.
When SMTP is the right path
- The application already has SMTP configuration fields.
- You want to replace another relay without changing message generation code.
- You do not need per-recipient substitution data or structured metadata at submit time.
- You can handle delivery outcomes through webhooks or dashboard exports.
Use the API path when you need templates, attachments, metadata, or a structured response with transmissionId.
Production requirements
- Use a verified sending domain.
- Enable STARTTLS.
- Store the API key in a secret manager.
- Keep SMTP credentials separate from API sending credentials.
- Wire webhooks before using the relay for critical mail.