Companies traditionally maintained their own SMTP servers for company email. With Office 365, that function can be offloaded to the cloud-based email system that Microsoft fully maintains. Over the years, the cloud-based offering has matured and become very reliable.
The bulk of a migration involves reconfiguring users’ Outlook installations on their desktops. This post focuses on migrating .NET applications that programmatically send out email.
Although you can specify the email settings both through web.config and app.config files or programmatically in the code, it is much better to do it in the config file.
To mitigate the risk of such a migration, one could approach this project in two steps.
- Remove all hard-coding from the code and reference the SMTP element of the config file. Do this while still pointing to the on premise SMTP server and test it. More Info: http://msdn.microsoft.com/en-us/library/ms164240(v=vs.110).aspx
- Edit the SMTP element in the config file to point to the Office 365 server and test it.
Get the necessary settings by going to Office 365 Outlook and selecting:
- See All Options
- My Account
- Settings for SMTP access.
You’ll then have the server, port, user, and password
Potential pitfall. Ensure that the max number of daily emails sent configured in Office 365 matches the need of your business. This is especially important when unattended applications automatically generate emails and send them out.
Send emails through Office365/Exchange Online using .NET
Send Email using Hotmail/Live/Office 365 in C#