C# send email with office365 smtp
The code in the question is OK. It was basically configuration on the Office365 account that needed to be done.
Check the following documentation by Microsoft for more information.
https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission#enable-smtp-auth-for-specific-mailboxes
If you've bought an Office365 email account with GoDaddy, ask them to enable SMTP AUTH. They'll enable it for you, but you still won't be able to use the Office365 smtp server on their hosting unless you're using a Virtual Private Server as GoDaddy blocks port 587 for shared hosting.
smtpclient.send hangs while trying to send email via office 365
After enabling SMTP auth following this process
https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission
we were able to solve the issue
Thanks
Tiklu
Related Topics
Convert Bitmaps to One Multipage Tiff Image in .Net 2.0
Example Using Hyperlink in Wpf
How to Find Fqdn of Local MAChine in C#/.Net
How Would You Make a Unique Filename by Adding a Number
Converting a Generic List to a CSV String
Http 404 Page Not Found in Web API Hosted in Iis 7.5
How to Use Showdialog Without Blocking All Forms
How to Access Configuration in Any Class in ASP.NET Core
Databind the Source Property of the Webbrowser in Wpf
Check If Instance Is of a Type
Implementing Collectionchanged
How Can a Separator Be Added Between Items in an Itemscontrol
How to Monitor Clipboard Content Changes in C#
Check If Value Exists in Datatable