Complete Office 365 SMTP – IMAP – POP Settings

With most Office 365 and Microsoft 365 plans, comes the Exchange Online mail server. As long as you are using Outlook (or the Outlook app), setting up your mail is pretty simple. But what are the correct Office 365 SMTP settings for your scanner or web application for example?

And what if you can’t use, because you can’t use SMTP Client submission? In this article, I will explain how you can use the SMTP server from Office 365 for your application or device.

Office 365 SMTP Settings

Let’s first start with the most asked and simple to answer question, what are the Office 365 Exchange Server settings? The settings below work for everyone with an Office 365 or Microsoft 365 plan that has Exchange Online.

SMTP Port587 (with TLS)
SSL ProtocolOff
TLS ProtocolOn
SMTP Username<your Office 365 email address> (
SMTP Password<your Office 365 password>
Office 365 SMTP Settings

With the settings above you will have a sending limit of 10,000 emails per day and 30 messages per minute. Which should be more than efficient for most use cases. If you need more you will need to use the SMTP Relay.


If you have MFA enabled for your account, then you can’t use your normal password to authenticate the Office 365 SMTP settings. You will need to create an App Password for this.

Another option is to use the Direct Send option that I will describe later on.

Office 365 IMAP Settings

To receive emails from Office 365 you may need to use IMAP. Again, if you are using MFA you will need to use an app password to set up the account.

  • IMAP Server address:
  • IMAP Port number: 993
  • Encryption: SSL / TLS
  • Authentication: Required
  • Username: <your Office 365 email address> (
  • Password: <your Office 365 password>

If you get an error Connection timed out, then most of the time the port is blocked in the firewall.

Office 365 SMTP Settings for Scanner or Application

To send an email from your scanner or application you can’t always use the first method. Not all scanners support SMTP with authentication and personally I don’t find it really convenient either. Another scenario could be that you don’t need to send the scans outside your organization.

This is also a limitation of this method, Direct Send, you can’t use this to send emails to external recipients. And to be exact, to people who don’t have an Office 365 mailbox (for example Gmail accounts).

Settings this up is a bit more complicated, but once you made changes in Office 365, you can use this for every device or application in your organization.

  1. Get your external IP Address, for example, add
  2. Sign in to Office 365 with the tenant admin account
  3. Go to Admin > Settings (click show all settings first) > Domains
  4. Select your domain and note the MX record
office 365 smtp settings
  1. Use the address, like <your-domain-com>, as the SMTP Server address.
  2. In the From field, you can enter any email address you like, as long it’s within your domain. The email address doesn’t have to have a mailbox or a license. So you can simply use scanner@<>
  3. You also need to change your SPF record so includes your external IP Address is a valid address to send mail from. Be default your SPF records looks like this:
v=spf1 ~all
  1. Change it to the following (where you replace with your external IP address)
v=spf1 ip4: ~all

You should now be able to send mail from your scanner or application to your user’s mailboxes. Keep in mind that DNS changes, like the SPF records, can take a couple of hours to apply.

5 thoughts on “Complete Office 365 SMTP – IMAP – POP Settings”

  1. Thank you very mutch for all help i ´m not anderstand and right english, only home english we could it. Bout i hope you now i´m so happy for all help and ithank you so mutch and you shell have nice Påsk!

  2. So what do you do with your spf when you have multiple devices at multiple physical locations each with a different external ip address?

  3. Thanks. Very helpful up to ‘change your SPF record’! How do I edit the SPF record? I see that it’s listed under TXT. Thanks again.

  4. Thanks for the article. Just to point out that the SMTP server is and not

Leave a Comment