Skip to content
Advertisement

SmtpClient.Send not working on linux environment

The following code, written in the .net core 2 environment, works in the windows environment but not in the linux environment.

JavaScript

Exception: Failure sending mail.

InnerExcepiton:

JavaScript

StackTrace:

JavaScript

Linux: Ubuntu 16.04.3 LTS

This is a console app. Why is not working in linux environment?

Advertisement

Answer

I thought it was a code error because of the error I had, but it was not. When I gave the relay authority on the mail server side my problem was solved. I think it is doing this automatically in windows environment.

Edit: Add ip address and allow anonymous user in Receive connectors / Exchange server

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement