In case you have a scenario where your application need to send emails but it is not able to connect directly to office 365 then you can setup IIS to send emails using office 365. Office 365 supports 3 different ways for SMTP relay – Client SMTP submission, Direct Send and SMTP relay.
After configuring the setup if you receive error like below:
————————————————————————
Message delivery to the host ‘xxx.xxx.xxx.xxx’ failed while delivering to the remote domain ‘examplesite.com’ for the following reason: The remote SMTP service rejected AUTH negotiation.
The SMTP verb which caused the error is ‘AUTH’. The response from the remote server is ‘250-examplesite.com.com Hello memo.txt.com [xxx.xxx.xxx.xxx.xxx]
250-SIZE
250-8BITMIME
250-PIPELINI’.
————————————————————————
OR
Message delivery to the host ‘xxx.xxx.xxx.xxx’ failed while delivering to the remote domain ‘examplesite.com’ for the following reason: The remote SMTP service rejected AUTH negotiation.
These errors will be observed in eventvwr–>windows log–>system. you can try the below fix to resolve these errors:
> From Windows administrative tools–> Open IIS 6.0 Manager
> Right click on SMTP virtual server and open properties
>Click on Delivery tab
> Click on outbound connections
> make sure the TCP port is set to 25.
>Open Outbound security
> Make sure “Anonymous access” is selected and TLS encryption checkbox is unchecked.
> Stop and start the SMTP virtual server.
Follow this article for more details on how to setup and troubleshoot each of these methods: How to setup IIS to send emails using Office 365