How to set up SQL Server Database Mail to send through Office 365

1. Log into Office 365 and go to Admin.



2. Go to Exchange.



3. Go to Mail Flow and select Connectors. Create a new Inbound Connector.


4. Connector Settings should be set as follows:

  • Note that the Sender IP Addresses should contain the internet-facing IP Address[es] of your SQL Server.
  • If you wish to use more than one SQL Server to send mail, you should add an entry for each different internet-facing IP Address.


  • 5. Set up the following Account in Database Mail:

  • You should set up a similar Account on each SQL Server from which you wish to send mail.
  • You can configure a separate Account for each E-mail Address you wish to use.
  • Each E-mail address you use must also be configured as an account in Office 365.


  • 6. Conclusion

    Your database mail is now configured to send emails through Office 365.Simply create a Database Mail Profile which uses the new Account, or assign the Account to an existing Profile. Test.