Where
Path:/app/admin/smtp.
Fields
SMTP server hostname. Exchange 365:
smtp.office365.com. Gmail: smtp.gmail.com.Typical ports:
587 for STARTTLS, 465 for SSL, 25 for legacy plain.Check for SSL/TLS (port 465). Leave unchecked for STARTTLS (port 587) — that’s the Exchange 365 default.
SMTP auth username. Usually the full mailbox email address.
SMTP auth password. For mailboxes with MFA: create an app password. Leave blank on edit to keep the existing password.
Envelope sender. Must match your SMTP auth’s allowed senders. Usually same as username.
Display name shown before the email in recipients’ clients. E.g. “iWorkWhen Scheduling”.
Optional — if set, replies go here instead of from_address.
Master switch. If off, the app skips sending emails (no error).
Exchange 365 quick-setup
Username / Password
Username: full Exchange email. Password: mailbox password OR — if MFA is on — an app password (Microsoft 365 Admin Center → Users → Active users → [mailbox] → Mail → Manage email apps → Create app password).
”SmtpClientAuthentication is disabled”
Microsoft disables SMTP AUTH by default on new Exchange 365 tenants. Enable it:- Tenant level: Exchange Admin Center → Settings → Mail flow → Turn off SMTP AUTH protection for this organization (set to unchecked).
- Mailbox level: Microsoft 365 Admin Center → Active users → [mailbox] → Mail → Manage email apps → check Authenticated SMTP.
How the password is stored
- You enter it in the form.
- The app encrypts it server-side using AES-256-GCM with a key held in an environment variable (
IW_ENCRYPTION_KEY). - Only the encrypted ciphertext is stored in the database.
- When sending, the server decrypts in memory and passes to nodemailer.
Events that trigger email
Out of the box:- Trade request created (to the target)
- Trade approved / denied (to both parties)
- Absence request created (to approvers)
- Absence approved / denied (to the requester)
- OT volunteer selected (to the selected user)
- Password reset requested (via the recovery link flow)
Required permission
smtp.manage — Admin only by default.
Troubleshooting
Test send fails with 535 Authentication unsuccessful
Test send fails with 535 Authentication unsuccessful
Either: (a) SMTP AUTH is disabled at the tenant or mailbox level — enable it via the Microsoft 365 Admin Center; (b) the password is wrong; (c) MFA is on and you need an app password instead of the regular password.
Test send says 'SMTP is not configured or is disabled'
Test send says 'SMTP is not configured or is disabled'
Check the Enable outbound email checkbox is on, and you’ve clicked Save. Also verify host/username/password are filled.
Emails work in test but not for approvals
Emails work in test but not for approvals
Approvals do fire
sendMail() but silently swallow errors so the DB action doesn’t fail. Check the Vercel function logs for the real error — typically auth or a network block.