Outgoing E-Mail
Self-Hosted Only
An instance sends e-mail only when you connect it to a mail provider: Amazon SES, or an SMTP server such as Microsoft 365, Google Workspace or a relay of your own. Until then nothing leaves the server, and everything else works: an invitation’s link is shown to the administrator who made it, as before.
An operator administrator sets the way of sending in the platform console, under E-Mail, Outgoing E-Mail. Once it is set there, the console wins over the Email settings, at once and on every instance of the API, with no restart. While nothing is set in the console, the Email settings below apply, so an instance run without the console sends as before.
What Is Sent
Section titled “What Is Sent”Every message is about a person’s own account or their organization. There is no marketing mail and no digest.
| Message | When | To |
|---|---|---|
| Confirm your e-mail address | Someone signs up with an e-mail address on the shared managed instance | The address typed |
| You are invited | An administrator invites someone, or an operator makes an organization | The invited address |
| Reset your password | Someone chooses Forgot Password? | An active person who may sign in with a password |
| Your password was changed | A reset link was used | The same person |
| Your organization will be deleted | A week before an ended trial is deleted, and again on its last day | The organization’s administrators |
| An operator alert | Something on the instance its operators should look at | The operator alert addresses, set in the console or in Email:OperatorAddresses |
| A test message | An operator chooses Send Test E-Mail in the console | The address the operator gives |
Each message is sent as HTML with a plain-text copy. It holds no image, no script and nothing that is fetched when it is opened, so nobody learns whether a message was read. A link in a message carries its token after a #, which a browser never sends to a server.
How Sending Works
Section titled “How Sending Works”Nothing in the application calls the mail provider while a person waits. A message is put in a queue in the database, and a task of the API sends it within seconds.
- A provider that is down delays a message and loses none. A message that cannot be given to the provider is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours, then given up on (
Email:MaxAttempts, 6 unless set). - A message the provider refuses for good is not tried again. The console shows the provider’s own words.
- Several API processes share the queue. Each message is taken by exactly one of them.
- A message’s words are not kept. They are encrypted with the instance’s own keys while the message waits, and erased when it ends. What stays for 90 days is to whom it went, its subject and how it ended.
The encryption uses the keys in the folder of keys (Assistant:KeysPath). On an instance with no such folder the keys change at every restart, and a message still waiting then cannot be read back: it is given up on, and the console says why.
Connect an Instance to Amazon SES
Section titled “Connect an Instance to Amazon SES”The application sends through Amazon Simple Email Service, API version 2. You need an AWS account, and a domain whose DNS you control.
- Verify your domain in SES, in the AWS Region you will send from. Create a domain identity with Easy DKIM and publish the three CNAME records SES gives you.
- Set a custom MAIL FROM domain on the identity, such as
bounce.example.com, and publish its MX and TXT records. This aligns SPF with your domain. - Publish a DMARC record at
_dmarc.example.com. Start withv=DMARC1; p=none; rua=mailto:<an address you read>and tighten it toquarantineonce the reports show every message passing. - Leave the SES sandbox. A new SES account delivers only to addresses and domains you have verified. On the SES Account dashboard, choose Request production access, with mail type Transactional. The sandbox is separate for each Region.
- Give the instance a way to send. Where the API runs in AWS, give its role the policy below and set no key. Anywhere else, create an IAM user with the policy and an access key.
- Enter them in the console (see Set It in the Console), or set the settings below and restart the API.
- Send a test from the console’s E-Mail area.
The policy lets the instance send as one address and read the account’s list of bounced addresses, and nothing else. Replace the account number, the Region, the domain and the address with yours.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "SendAsOneAddress", "Effect": "Allow", "Action": ["ses:SendEmail", "ses:SendRawEmail"], "Resource": [ "arn:aws:ses:us-west-1:111122223333:identity/example.com", "arn:aws:ses:us-west-1:111122223333:configuration-set/*" ], "Condition": { "StringLike": { "ses:FromAddress": ["no-reply@example.com", "* <no-reply@example.com>"] } } }, { "Sid": "ReadSuppressionListAndQuota", "Effect": "Allow", "Action": ["ses:ListSuppressedDestinations", "ses:GetSuppressedDestination", "ses:GetAccount"], "Resource": "*" } ]}The second from-address pattern is needed because the application sends with a display name. The configuration-set resource is needed when the identity has a default configuration set, which SES checks as well.
Set It in the Console
Section titled “Set It in the Console”In the console’s E-Mail area, the Outgoing E-Mail card shows a status line: On with the way of sending and its Region or server, or Off; when a message was last sent; and the last refusal, in the provider’s or the server’s own words. Every operator sees it and may Send Test E-Mail. An operator administrator chooses Change:
- Way of Sending: Off, Amazon SES or SMTP. Off set here sends nothing, whatever the settings say.
- For every way: From Address, From Name, Reply-To Address and Operator Alert Addresses, one a line.
- Amazon SES: the AWS Region, the Access Key ID and the Secret Access Key. Leave the access key empty where the API has a role in AWS.
- SMTP: the Server, the Security, the Port, a User Name and a Password. STARTTLS on port 587 is the usual choice; TLS is implicit TLS on port 465. None sends in plain text, so the console takes it only for
localhostor a private address (10.x.x.x, 172.16.x.x to 172.31.x.x, 192.168.x.x, fc00::/7): over the internet the password and every message could be read on the way. Leave the user name and password empty for a relay that asks for none.
Review the Change lists what changes and asks for a reason; Save and Use It puts it in effect for the next message. Each change is recorded in the platform audit, never with a secret.
The secret access key and the password are sealed with the instance’s own keys (the folder Assistant:KeysPath) before they are stored, and are never shown again: the card says only Set, with who entered it and when. Left empty in a change, a secret is kept while its access key, or its server and user name, stay the same. A wrong setting makes sends fail and shows on the status line; signing in never depends on e-mail.
| Mail Host | Server | Security | Sign-In |
|---|---|---|---|
| Microsoft 365 | smtp.office365.com, port 587 |
STARTTLS | The sending mailbox, with SMTP AUTH allowed for it in the Microsoft 365 admin center |
| Google Workspace | smtp.gmail.com, port 587 |
STARTTLS | The sending account, with an app password |
| Your own relay | Its name or address | STARTTLS, TLS, or None on a private network | As the relay asks, or none |
Settings
Section titled “Settings”While nothing is set in the console, these apply. Once the console is set, it wins, and only Email:SupportAddress, Email:MaxAttempts, Email:DeliverySeconds, Email:SuppressionMinutes and Email:RequestsPerHour still come from here.
| Setting | What It Is | Default |
|---|---|---|
Email:SesRegion |
The AWS Region whose SES sends, such as us-west-1. Empty: the instance sends nothing |
empty |
Email:FromAddress |
The address messages come from, at the domain you verified | empty |
Email:FromName |
The name shown beside it | NetBlueprint Forge |
Email:ReplyTo |
Where a person’s answer goes, when the from address reads no mail | empty |
Email:SupportAddress |
The address every message’s footer and the sign-in page give for questions | empty |
Email:OperatorAddresses |
Who receives operator alerts (Email__OperatorAddresses__0, __1 and so on). Empty: alerts are written to the log only |
none |
Email:SesAccessKey, Email:SesSecretKey |
The access key and secret of the IAM user. Leave both empty where the API has a role in AWS. Keep the secret in your platform’s secret store | empty |
Email:MaxAttempts |
How many times sending a message is tried, 1 to 10 | 6 |
Email:DeliverySeconds |
How often an API process looks at the queue, besides whenever it queues a message itself. 0: this process sends nothing and another does | 15 |
Email:SuppressionMinutes |
How often the provider’s list of bounced addresses is read. 0: never | 15 |
Email:RequestsPerHour |
Requests one internet address may make in an hour on the pages that write to an address anyone may type: signing up with an e-mail address and Forgot Password? | 10 |
Platform:WorkspaceAddress is where a link in a reminder leads. Set it to the workspace’s own address, such as https://app.example.com.
Under Docker Compose the same settings are the EMAIL_ variables of .env; .env.example lists them.
Bounced Addresses and Complaints
Section titled “Bounced Addresses and Complaints”SES keeps an account-level suppression list: an address goes on it when a message to it bounces for good, or when its holder reports a message as unwanted. SES then takes a message for that address and delivers nothing.
The application reads that list every 15 minutes and keeps each address in its own list of Addresses Not Mailed Again. A message for an address on the list is never given to the provider, and the console shows it as Held Back with the reason.
- The list belongs to the AWS account, so it also holds addresses that bounced for other applications that send from the same account. That is what SES does with them anyway.
- A mailbox that is full or a server that is down for a while is a temporary failure. SES does not list those, and neither does the application.
- An operator can add an address by hand, such as one whose holder asked not to be written to, and take one off. An address the provider still lists is delivered nothing until you take it off the provider’s list too, in the SES console under Suppression list.
- While the account is in the sandbox, SES refuses to give the list. The console says so; sending to verified addresses still works.
The Console’s E-Mail Area
Section titled “The Console’s E-Mail Area”Operators see how the instance sends in the platform console, under E-Mail:
- Outgoing E-Mail: the status line, where the way of sending was set (Set Here or From the Server’s Settings), Send Test E-Mail, and for an operator administrator Change.
- How This Instance Sends: the provider and its Region or server, the from and reply addresses, whether the provider’s account has production access, its limits, and the queue in figures. A key is never shown.
- Send Test E-Mail: a real message to an address you give, through the same queue as every other. The dialog shows Sent with the provider’s message id, or the provider’s own words when it refused.
- Messages: the newest 200, with to whom, about what, for which organization and how each ended.
- Addresses Not Mailed Again: the list, Read the Provider’s List Now, Add an Address and Take Off the List, each change with a reason.
To check that mail is authenticated as your domain, open the test message’s original source in your mail program and look for dkim=pass, spf=pass and dmarc=pass.
An Instance That Sends No E-Mail
Section titled “An Instance That Sends No E-Mail”With Off set in the console, or with nothing set there and Email:SesRegion empty:
- An invitation’s link is shown to the administrator, who sends it to the person themselves.
- Forgot Password? is not offered. An administrator invites the person again, or an operator helps from the console.
- Signing up with an e-mail address is not offered. It is for the shared managed instance in any case.
- A trial’s end is told by the strip on every screen alone.
- Each message that would have been sent is noted in the API’s log with its recipient and subject, never its words.
What Is Kept
Section titled “What Is Kept”| What | For How Long |
|---|---|
| The record of a message: the address, the subject, the kind and the outcome | 90 days after it ended |
| A message’s words | Until it is sent or given up on, encrypted |
| An address on the list of those not mailed again | Until an operator takes it off |
| A sign-up that was never confirmed: the address and the organization’s name as typed | 7 days after its link ran out |
| A reset link’s record (never the link itself, only a hash of its token) | 1 day after its hour |
A message about an organization is deleted with the organization when an ended trial is deleted.