How to set up SQL Server Database Mail to send through Office 365
![](http://www.opwernby.com/Articles/Exchange/Office365/DBMail/1.png)
2. Go to Exchange.
![](http://www.opwernby.com/Articles/Exchange/Office365/DBMail/2.png)
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.
![](http://www.opwernby.com/Articles/Exchange/Office365/DBMail/4.png)
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.
![](http://www.opwernby.com/Articles/Exchange/Office365/DBMail/5.png)
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.
|