Quick answer
| Setting | Incoming (IMAP) | Outgoing (SMTP) |
|---|---|---|
| Server | outlook.office365.com | smtp.office365.com |
| Port | 993 | 587 |
| Encryption | SSL/TLS | STARTTLS |
| Username | Your full work or school email address | |
| Password | “Sign in with Microsoft” (OAuth). Basic authentication is off | |
Personal @outlook.com and @hotmail.com addresses use a different SMTP server; see the Outlook.com guide.
Before you start
- Microsoft turned off basic authentication (username + password) for IMAP in Exchange Online in 2022. Apps must connect with Sign in with Microsoft (OAuth).
- Your administrator decides, per mailbox, whether IMAP and Authenticated SMTP are allowed. Authenticated SMTP is off by default in many organisations.
- Some organisations also require an administrator to approve each third-party app before staff can sign in to it.
What the administrator needs to enable
- Open the Microsoft 365 admin center and go to Users → Active users.
- Select the user, open the Mail tab and choose Manage email apps.
- Tick IMAP and Authenticated SMTP, then save. Changes can take a while to apply.
- If staff see a “Need admin approval” screen when signing in to the app, an administrator must grant consent for it.
- The user can then connect with “Sign in with Microsoft” using the settings above.
Common errors and how to fix them
- “535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant”
- Authenticated SMTP is switched off for your organisation or mailbox. An administrator has to enable it (steps above).
- “Need admin approval” when signing in
- Your organisation only allows approved apps. Ask your administrator to grant consent.
- “Authentication failed” with the right password
- The app is trying basic authentication, which Exchange Online rejects. Use an app with Microsoft sign-in.
Use Microsoft 365 alongside your other accounts
MailsOnMine connects Microsoft 365 mailboxes with Microsoft sign-in and keeps them in one unified inbox with Gmail and your other accounts. Your administrator still has to allow IMAP and Authenticated SMTP for the mailbox.
Try MailsOnMine freeFree plan: 1 connected account, no card required.
Frequently asked questions
Is Office 365 the same as Microsoft 365?
Yes. Microsoft renamed most Office 365 plans to Microsoft 365, and the mail servers are the same.
Why does SMTP work for one colleague and not another?
Authenticated SMTP is set per mailbox. It may be enabled for one user and not for another.
Is Microsoft retiring SMTP with passwords?
Microsoft is phasing out password-based SMTP AUTH in Exchange Online. OAuth sign-in is the route that keeps working.