Guides
SMTP
Applications and devices that can only speak SMTP, such as a scanner, a monitoring system or an older application, can send through a tsmart.ai mailbox. The mail is sent as that mailbox, with its address as the sender.
Connection settings
| Setting | Value |
|---|---|
| Server | mail.tsmart.ai |
| Port and security | 587 with STARTTLS, or 465 with TLS from the start (SSL/TLS) |
| TLS version | TLS 1.2 or newer |
| Authentication | Required (user name and password) |
| User name | The full email address of the mailbox, for example scanner@acme.com |
| Password | An app password for the mailbox (recommended), or the mailbox password |
The same settings are shown on each user's page in the console under Mail client settings. Most applications ask for them like this:
SMTP_HOST=mail.tsmart.ai
SMTP_PORT=587 # STARTTLS; or 465 for TLS from the start
SMTP_USER=scanner@acme.com
SMTP_PASSWORD=<app password> import os
import smtplib
import ssl
from email.message import EmailMessage
msg = EmailMessage()
msg["From"] = "Scanner <scanner@acme.com>"
msg["To"] = "office@acme.com"
msg["Subject"] = "Scanned document"
msg.set_content("A new document was scanned and filed.")
context = ssl.create_default_context()
context.minimum_version = ssl.TLSVersion.TLSv1_2
with smtplib.SMTP("mail.tsmart.ai", 587) as smtp:
smtp.starttls(context=context)
smtp.login("scanner@acme.com", os.environ["SMTP_APP_PASSWORD"])
smtp.send_message(msg) App passwords
An app password lets one application sign in to a mailbox without knowing the mailbox's own password. Each app password can be revoked on its own, and changing the mailbox password does not break it.
- In the console open Users, select the user, then Security → App passwords.
- Click Create app password and give it a name, for example Office scanner.
- Under Allowed access, select Sending (SMTP). Each app password works only for the kinds of access selected, so an SMTP-only password cannot read mail.
- Click Generate and copy the password into the application. It is shown only once.
- A mailbox can have up to 20 app passwords. Revoke unused ones from the same page.
- 2-step verification protects the console sign-in only. Use app passwords for devices and applications anyway, so the mailbox password is never stored in them.
- Company owners can create app passwords for any user; other administrators only for their own mailbox.
Limits
| What | Limit |
|---|---|
| Message size | 100 MB including attachments after encoding. Encoding adds about a third, so about 73 MB of files. |
| Sending limit per domain | 500 messages per hour by default, for all mailboxes of the domain together |
A company administrator with the mail settings privilege can change the domain's limit, or set a separate limit for
a single user, under Apps → Core services → Mail → Sending limits. Limits can be set per second,
minute, hour or day; 0 removes the limit. A user's own limit applies instead of the domain limit. Messages
over the limit are not lost: they are deferred and delivered once the period has passed. Messages above the size
limit are rejected with an explanatory bounce.
Sender address
The From address must be the mailbox's own address or one of its alternate emails; the server refuses other sender
addresses. Mail sent over SMTP is signed with the domain's DKIM key, so the domain needs the same SPF and DKIM
records as for the API (see Domains and DNS). Use a
dedicated mailbox per application, such as scanner@acme.com, so its app password and sending limit stay
separate from people's mailboxes.