Skip to content

SMTP

Sosyabot uses SMTP for every outbound email: signup OTP codes, password reset links, invitation emails, billing receipts, and notification digests. Without working SMTP, no one can register a new account — the OTP flow blocks signup until the code is entered.

ENV

SMTP_HOST=smtp.sendgrid.net    # or AWS SES, Mailgun, your own postfix, etc.
SMTP_PORT=587
SMTP_USER=
SMTP_PASS=
SMTP_FROM=Sosyabot <noreply@your-domain>

Sosyabot uses nodemailer. Standard SMTP options apply — TLS (STARTTLS on 587) or SMTPS (TLS on 465) are auto-detected by port.

Test from the admin panel

Open Admin → SMTP and click Send test email. The endpoint dispatches a single test message to the admin's address. Failure surfaces the underlying nodemailer error inline.

Test from the CLI

bash
./service.sh health

The health check reports the API as OK as long as the process is up; it does not test SMTP. For a deeper smoke test, register a throwaway account and verify the OTP arrives.

Common providers

ProviderHostPortAuth
AWS SESemail-smtp.<region>.amazonaws.com587SES SMTP credentials
SendGridsmtp.sendgrid.net587apikey + the API key
Mailgunsmtp.mailgun.org587postmaster + domain
Postmarksmtp.postmarkapp.com587server token
Local postfixlocalhost25(none)

SPF / DKIM / DMARC

Configure these on the sending domain or the OTP emails will land in spam. Verifications take time — set them up before you send your first production OTP.