-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Known issue: MailTarget + SSL + port 465 isn't working #1226
Comments
Mail api which support implicit ssl https://www.nuget.org/packages/AIM Edit bad reviews for AIM |
Looks nice: https://github.com/jstedfast/MailKit |
Will close this as this is a known issue as it's polluting the issue list - there is no action for us here. |
There is now a NLog.MailKit package: |
NLog.MailKit Works like charm on net 4.5. thanks !! |
@304NotModified, could you pls elaborate how to use SSL (gmail) with NLog.MailKit? |
Install the package: Install-Package NLog.MailKit and add to your nlog.config: <extensions>
<add assembly="NLog.MailKit"/>
</extensions> See https://github.com/NLog/NLog.MailKit/blob/master/README.md Use the target "mail" and config options can be found here: https://github.com/NLog/NLog/wiki/Mail-Target |
I did it and did follow the link which mentions
And redirects to this page. Do you have a piece of config which configures gmail w/ SSL? |
So use port 587 |
Why does https://github.com/NLog/NLog/wiki/Mail-Target still say:
My understanding is that as long as MailKit is used there should be no problems with port 465 and SSL? I just tested it and it seems to work fine: <?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="true">
<targets>
<target name="logconsole" xsi:type="Console" />
<target name="logmail" xsi:type="Mail"
subject="Email logging test"
to="redacted"
from="redacted"
smtpUserName="redacted"
enableSsl="true"
secureSocketOption="SslOnConnect"
smtpPassword="redacted"
smtpAuthentication="Basic"
smtpServer="redacted"
smtpPort="465"
timeout="100000"
/>
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="logconsole" />
<logger name="*" minlevel="Warning" writeTo="logmail" />
</rules>
<extensions>
<add assembly="NLog.MailKit"/>
</extensions>
</nlog>
|
Thanks, please update the wiki. It is indeed working for NLog mailkit (thanks for the confirm!). PS: The page is shared for the mail target in NLog and NLog mailkit |
Done. |
Thanks! |
See http://stackoverflow.com/questions/35228313/nlog-mail-target-timeouts/35235850#35235850
The text was updated successfully, but these errors were encountered: