Mat-Tap
Mat-Tap

Reputation: 755

NLog is not sending emails

I have NLog configured to send emails, it is logging correctly to a file but it is not sending the emails on a specific computer, with the exact same configuration it works on other pc's.

I would like to know how can I log the result of the email sending if it failed. I already tried enabling the throwexceptions flag, without results.

Anyone knows if it is possible to log the failed email operation?

Thanks in advance!

Upvotes: 1

Views: 1388

Answers (1)

Steve Kennedy
Steve Kennedy

Reputation: 5402

I don't know if it's possible to log the failed email operation.

This might help: https://github.com/NLog/NLog/wiki/Internal-Logging

Also here's some things I've done before, just in case it helps:

  1. As you mentioned, ensure throwExceptions="true" in the nlog node.
  2. Ensure whatever machine that is running the process has NET access to that mail server. I telnet from that machine to the mail server, just to be sure.
  3. Does your mail server require SMTP authentication?
  4. Start removing things from the equation, like additional to= recipients.

Upvotes: 2

Related Questions