E-mail goes out over SMTP, through any provider, behind the IEmailSender port
(Blouppy.Infrastructure.Email, built on MailKit). In development every e-mail is caught by
MailPit, at http://localhost:8025.
Two hosts send e-mail, so both need the settings:
| Host | Sends |
|---|---|
Identity host (Blouppy.Identity) | Account e-mails: confirmation, forgotten password, personal access tokens, SSO notices |
API (Blouppy.Web) | Everything else: invitations, notifications, data exports, account deletion |
Settings
| Variable | Default | Notes |
|---|---|---|
Email__Smtp__Host | — | Required |
Email__Smtp__Port | 587 | |
Email__Smtp__Security | Auto | Auto, StartTls, SslOnConnect or None |
Email__Smtp__Username, Email__Smtp__Password | — | Both, or neither; refused with Security=None |
Email__FromAddress | — | Required; an address on a domain your provider has verified |
Email__FromName | — | The display name — also the product name in the e-mails' header and copyright line |
Email__Footer__PrivacyUrl, Email__Footer__TermsUrl | — | The footer's links; empty leaves a link out |
The hosts refuse to start in Production on an incomplete configuration, and name every missing key. A failed send is logged with the SMTP host and port, never the credentials.
Which port
- 587 with
StartTls— the submission port, offered by every provider. PreferStartTlstoAutohere:Autowould carry on unencrypted if the server stopped offering STARTTLS;StartTlsrefuses to. - 465 with
SslOnConnect— TLS from the first byte. Use it when your provider offers it. - Not 25: most clouds block it outbound.
Whatever the provider, verify the sending domain on its side (SPF, DKIM, ideally DMARC), or
the mail lands in spam. back/Blouppy.Infrastructure.Email/README.md has the settings for
Brevo, Amazon SES, Resend and Postmark.
The e-mails' content
The layout and the templates are in back/Blouppy.Infrastructure.Email*/. A few e-mails
also name the product in their subject or text, in the code that sends them — the
SendEmailWhen… and NotifyInviteeWhen… handlers, DataExportService and
AccountDeletionService: search them for Blouppy when you rename.