serilog/serilog-sinks-email

Can't send with gmail

prandoz opened this issue · 2 comments

Hi,
I try to configure for send email with gmail but not work.

This is my configuration:

{
"Name": "EmailCustom",
"Args": {
"fromEmail": "xxx@gmail.com",
"toEmail": "xxx@gmail.com",
"enableSsl": "true",
"emailSubject": "Template Error",
"isBodyHtml": "false",
"mailServer": "smtp.gmail.com",
"networkCredentialUserName": "xxx@gmail.com",
"networkCredentialPassword": "P4s$w0rd",
"smtpPort": 587,
"outputTemplate": "{Timestamp:o} [{Level:u3}] ({SourceContext}) {NewLine}{Message}{NewLine}{Exception}",
"batchPostingLimit": 1,
"periodMinutes": 1,
"restrictedToMinimumLevel": "Error"
}
}

Someone have un idea?
Thank you

Add this to your startup to see why it isn't sending:

Serilog.Debugging.SelfLog.Enable(Console.WriteLine);

Could be incompatibility with #107 MailKit 3.0+

Thank's @xantari, I add the SelfLog and I understand that I don't waiting the complete of procese, than I close the debug before serilog can send the mail