1
votes

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!

1
different mail servers? Also NLog - if I remember right - have the ability to turn on logging for internal errors. - Allan S. Hansen

1 Answers

2
votes

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.