Microsoft 365 SMTP Settings
Server smtp.office365.com, port 587
with STARTTLS. Full configuration, authentication requirements and
fixes for the errors Microsoft 365 actually returns.
Microsoft 365 business mailboxes relay through smtp.office365.com on port 587. SMTP AUTH is disabled by default on new tenants, so the mailbox has to be explicitly allowed before any client can authenticate.
Microsoft 365 SMTP server settings
Outgoing mail (SMTP)
- SMTP server
- Port
- STARTTLS · SMTP AUTH client submission
- Encryption
- STARTTLS
- Authentication
- SMTP AUTH must be enabled per-mailbox; OAuth 2.0 preferred
- Username
- The licensed mailbox address (UPN)
- Password
- Mailbox password or app password when MFA is enforced
- Sending limit
- 10,000 recipients/day, 30 messages/minute per mailbox
Incoming mail settings (IMAP & POP3)
SMTP sends mail; IMAP and POP3 retrieve it. You will usually need both sides configured for a working mail client.
| Protocol | Server | Port | Encryption |
|---|---|---|---|
| SMTP Outgoing | smtp.office365.com |
587 | STARTTLS |
| IMAP Incoming | outlook.office365.com |
993 | SSL/TLS |
| POP3 Incoming | outlook.office365.com |
995 | SSL/TLS |
How to set up Microsoft 365 SMTP
- In the Microsoft 365 admin center, open Users → Active users and select the mailbox.
- Under Mail → Manage email apps, tick Authenticated SMTP.
- If security defaults or Conditional Access enforce MFA, create an app password for the mailbox.
- Use
smtp.office365.com, port587, STARTTLS. - Authenticate with the mailbox UPN and its password or app password.
Verify it before you deploy. Paste these settings into the free SMTP test tool and send yourself a test message. It takes about twenty seconds and tells you whether Microsoft 365 accepted the connection, the encryption and the login — before your application depends on it.
Common Microsoft 365 SMTP errors
| Error | What to do |
|---|---|
535 5.7.139 Authentication unsuccessful, SMTP AUTH is disabled for the Tenant |
Enable Authenticated SMTP on the mailbox, and clear the tenant-wide block with Set-TransportConfig -SmtpClientAuthenticationDisabled $false. |
550 5.7.60 Client does not have permissions to send as this sender |
The From address does not match the authenticated mailbox. Grant Send As rights or use the mailbox address. |
554 5.2.0 STOREDRV.Submission.Exception |
The mailbox is over quota or the message exceeds size limits. |
Seeing a reply code that isn't listed here? Every standard SMTP response is explained in our SMTP error code reference.
Microsoft 365 SMTP — frequently asked questions
The Microsoft 365 SMTP server is smtp.office365.com. Connect on port 587 using STARTTLS encryption.
Port 587 with STARTTLS (SMTP AUTH client submission).
Username: The licensed mailbox address (UPN)
Password: Mailbox password or app password when MFA is enforced
Enable Authenticated SMTP on the mailbox, and clear the tenant-wide block with Set-TransportConfig -SmtpClientAuthenticationDisabled $false.
The From address does not match the authenticated mailbox. Grant Send As rights or use the mailbox address.
The mailbox is over quota or the message exceeds size limits.