Third party Smtp setting in office 365

Third party Smtp setting in office 365

Configure a connector to send mail using Office 365 SMTP relay More Info

This option is more difficult to implement than the others. Only choose this option when:

  • SMTP client submission (Option 1) is not compatible with your business needs or with your device

  • You can't use direct send (Option 2) because you must send email to external recipients.

SMTP relay lets Office 365 relay emails on your behalf by using your public IP address (or a certificate) to authenticate Office 365. To do this, you'll need to set up a connector for your Office 365 account, which is what makes this a more complicated configuration.

Settings for Office 365 SMTP relay

Device or application setting


Server/smart host

Your MX endpoint, e.g.


Port 25



Email address

Any email address for one of your Office 365 verified domains. This email address does not need a mailbox.

If you have set up Exchange Hybrid or have a connector configured for mail flow from your email server to Office 365, it is likely that no additional setup will be required for this scenario. Otherwise, create a mail flow connector to support this scenario:

Connector setting



Your organization's email server


Office 365

Domain restrictions: IP address/range

Your on-premises IP address or address range that the device or application will use to connect to Office 365.

We recommend adding an SPF record to avoid having messages flagged as spam. If you are sending from a static IP address, add it to your SPF record in your domain registrar’s DNS settings as follows:

DNS entry



v=spf1 ip4:<Static IP Address> ~all

Step-by-step configuration instructions for SMTP relay

  1. Obtain the public (static) IP address that the device or application with send from. A dynamic IP address isn’t supported or allowed. You can share your static IP address with other devices and users, but don't share the IP address with anyone outside of your company. Make a note of this IP address for later.

  2. Sign in to Office 365.

  3. Select Domains. Make sure your domain, such as, is selected. Click Manage DNS and find the MX record. The MX record will have a POINTS TO ADDRESS value that looks similar to as depicted in the following screenshot. Make a note of the MX record POINTS TO ADDRESS value. You'll need this later.

    Make a note of the MX record Points to address value.
  4. Check that the domains that the application or device will send to have been verified. If the domain is not verified, emails could be lost, and you won’t be able to track them with the Exchange Online message trace tool.

  5. In Office 365, click Admin, and then click Exchange to go to the Exchange admin center.

  6. In the Exchange admin center, click mail flow, and click connectors.

  7. Check the list of connectors set up for your organization. If there is no connector listed from your organization's email server to Office 365, create one.

    1. To start the wizard, click the plus symbol +. On the first screen, choose the options that are depicted in the following screenshot:

      Choose from your organization's email server to Office 365

      Click Next, and give the connector a name.

    2. On the next screen, choose the option By verifying that the IP address of the sending server matches one of these IP addresses that belong to your organization, and add the IP address from step 1.

    3. Leave all the other fields with their default values, and select Save.

  8. Now that you are done with configuring your Office 365 settings, go to your domain registrar’s website to update your DNS records. Edit your SPF record. Include the IP address that you noted in step 1. The finished string should look similar to this: v=spf1 ip4: ~all, where is your public IP address. Skipping this step can cause email to be sent to recipients’ junk mail folders.

  9. Now, go back to the device, and in the settings, find the entry for Server or Smart Host, and enter the MX record POINTS TO ADDRESS value that you recorded in step 3.

  10. To test the configuration, send a test email from your device or application, and confirm that it was received by the recipient.

How Office 365 SMTP relay works

In the following diagram, the application or device in your organization’s network uses a connector for SMTP relay to email recipients in your organization.

Shows how a multifunction printer connects to Office 365 using SMTP relay.
  • The Office 365 connector that you configure authenticates your device or application with Office 365 using an IP address. Your device or application can send email using any address (including ones that can't receive mail), as long as the address uses one of your domains. The email address doesn’t need to be associated with an actual mailbox. For example, if your domain is, you could send from an address like

  • Office 365 SMTP relay uses a connector to authenticate the mail sent from your device or application. This allows Office 365 to relay those messages to your own mailboxes as well as external recipients. Office 365 SMTP relay is very similar to direct send except that it can send mail to external recipients.

  • Due to the added complexity of configuring a connector, direct send is recommended over Office 365 SMTP relay, unless you must send email to external recipients. To send email using Office 365 SMTP relay, your device or application server must have a static IP address or address range. You can't use SMTP relay to send email directly to Office 365 from a third-party hosted service, such as Microsoft Azure.

Features of Office 365 SMTP relay

  • Office 365 SMTP relay does not require the use of a licensed Office 365 mailbox to send emails.

  • Office 365 SMTP relay has higher sending limits than SMTP client submission; senders are not bound by the 30 messages per minute or 10,000 recipients per day limits.

Requirements for Office 365 SMTP relay

  • Static IP address or address range: Most devices or applications are unable to use a certificate for authentication. To authenticate your device or application, use one or more static IP addresses that are not shared with another organization.

  • Connector: You must set up a connector in Exchange Online for email sent from your device or application.

  • Port: Port 25 is required and must not be blocked on your network or by your ISP.

  • Licensing: SMTP relay doesn’t use a specific Office 365 mailbox to send email. This is why it’s important that only licensed users send email from devices or applications configured for SMTP relay. If you have senders using devices or LOB applications who don’t have an Office 365 mailbox license, obtain and assign an Exchange Online Protection license to each unlicensed sender. This is the least expensive license that allows you to send email via Office 365.

Limitations of Office 365 SMTP relay

  • Sent mail can be disrupted if your IP addresses are blocked by a spam list.

  • Reasonable limits are imposed for sending. For more information, see Higher Risk Delivery Pool for Outbound Messages.

  • Requires static unshared IP addresses (unless a certificate is used).

    • Related Articles

    • Printer & Devices Smtp settings

      Configure a connector to send mail using Office 365 SMTP relay More Info This option is more difficult to implement than the others. Only choose this option when: SMTP client submission (Option 1) is not compatible with your business needs or with ...
    • Microsoft Office 365 Message limits

      Office 365 Message limits More Info The following limits are applied to every email message. Message size limit   Message size limits are necessary to prevent large messages from blocking delivery of other messages and affecting service performance ...
    • Microsoft Office 365 Email Receiving and sending limits

      Receiving and sending limits More Info Receiving and sending limits are applied to combat spam and mass-mailing worms or viruses. These limits help to protect the health of our systems and keep our users safe. Receiving limits Receiving limits apply ...
    • System requirements for Office 365

      System requirements for Office 365 More Info System requirements for Office Office 365 is designed to work best with Office 2016, Office 2013, and Office 2016 for Mac. Previous versions of Office, such as Office 2010 needs Minimum SP2 Updated, Office ...
    • Office 365 Unpkey

      1.  Remove Office 365 license for Subscription based installs (not Shared Computer Licensing scenarios): To remove the Office 365 license, you must run two cscript command lines. The command lines are:         A. Run C:\program files <x86>\Microsoft ...