DEV Community

Cover image for ENABLE SMTP FOR OFFICE 365
jeff-nelson-78954
jeff-nelson-78954

Posted on

ENABLE SMTP FOR OFFICE 365

I recently signed up for a office 365 account for my domain. I tried to create a simple C# application that sends emails via SMTP. I was getting the following error "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [CH2PR18CA0002.namprd18.prod.outlook.com]". This error also prevented me from setting up database mail in SQL Server. I followed the Microsoft documentation and tried the direct SMTP Auth, direct send, and Office 365 SMTP relay methods. After a ton of Googling and wasting more time then I am willing to admit I finally landed on a solution that worked for me.

Read More

Top comments (0)