You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SelfLog.Enable(Console.Error) returns the following message:
2022-01-12T13:41:58.1815631Z Exception while emitting periodic batch from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink: System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task MailKit.MailTransport.Se
ndAsync(MimeKit.MimeMessage, System.Threading.CancellationToken, MailKit.ITransferProgress)'.
at Serilog.Sinks.Email.EmailSink.EmitBatchAsync(IEnumerable1 events) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Serilog.Sinks.Email.EmailSink.EmitBatchAsync(IEnumerable1 events)
at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.OnTick()
I checked the dll in debug/net6.0 folder.
The folder contains MailKit 3.0.0 built for .NET 5.
This DLL has SendAsync methods.
If you build a project for the .NET 5 platform, email logging works and there are no runtime errors.
The subject of this tickets is incorrect as it is not a .net 6 issue. The problem is that the Serilog.Sinks.Email packages is not compatible with the latest Mailkit version.
December 2023 update. This is still an issue with .net 8 and the latest version of Serilog.Sinks.Email. I had to downgrade my mailkit version, and the reinstal Serilog.Sinks.Email.. and the logs started coming.
I would love to find the proper place to track this as Mailkit is way outta date now.
3.0.0-dev-* updates the project to MailKit 4; now on NuGet but needs some testing and feedback as quite a bit of surgery was done :-) - all help appreciated!
Activity
ultravelocity commentedon Feb 15, 2022
Experiencing the same issue here. It seems the method signature in MailKit changed.
wschroers commentedon Feb 21, 2022
Also experiencing the same issue here, any help would be appreciated.
Update: I downgraded Mailkit to version 2.15 as a temporary solution to get it back working again.
janssenr commentedon Mar 9, 2022
I installed Serilog.Sinks.Email with NuGet Package Manager from Visual Studio 2022.
And it installed MailKit 2.6.0.
And I experience no problems
wschroers commentedon Mar 14, 2022
The subject of this tickets is incorrect as it is not a .net 6 issue. The problem is that the Serilog.Sinks.Email packages is not compatible with the latest Mailkit version.
fakhrulhilal commentedon Jul 13, 2022
I have the same version as you, but still having the problem, it doesn't send any email.
Serilog.Sinks.Email 2.4.0
MailKit 2.6.0
.NET6
janssenr commentedon Jul 13, 2022
My Project settings are:
@fakhrulhilal Can you post the project which is not working? Then I will take a look.
xantari commentedon Nov 17, 2022
Related to #107
Zero-Xiong commentedon Jun 1, 2023
still got the same issue.
I have installed
bplus0 commentedon Dec 20, 2023
December 2023 update. This is still an issue with .net 8 and the latest version of Serilog.Sinks.Email. I had to downgrade my mailkit version, and the reinstal Serilog.Sinks.Email.. and the logs started coming.
I would love to find the proper place to track this as Mailkit is way outta date now.
nblumhardt commentedon Dec 23, 2023
3.0.0-dev-* updates the project to MailKit 4; now on NuGet but needs some testing and feedback as quite a bit of surgery was done :-) - all help appreciated!