I have followed the instructions to log to a gmail address:
https://github.com/NLog/NLog/wiki/ExamplesI am using all settings within the nlog target, with useSystemNetMailSettings="false"
<target name="gmail" xsi:type="Mail"
smtpServer="
smtp.gmail.com" smtpPort="587" smtpAuthentication="Basic" enableSsl="true" useSystemNetMailSettings="false"
smtpUserName="
nor...@xxx.com" smtpPassword="xxx"
from="
nor...@xxx.com" to="
y...@xxx.com" subject="Fatal Exception Error"
layout="${longdate:format=yyyy-MM-dd HH:mm:ss} ${level:uppercase=true:padding=5} ${message} ${exception:format=Message,StackTrace}"
/>
The configuration is in the app.config in a windows applications.
I get the following within the internal log, although there are no emails getting sent via that account:
2014-10-13 14:40:19.3488 Debug Sending mail to
y...@xxx.com using
smtp.gmail.com:587 (ssl=True)
[actual email replaced with y...@xxx.xom etc]
This gmail account is being used by other .net applications without a problem.
Any ideas?