Send Smtp Email Using System.Net.Mail via Exchange Online (Office 365)

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



Leave a reply



Submit