-
Notifications
You must be signed in to change notification settings - Fork 69
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
Email logging does not work on the .NET 6. #106
Comments
Experiencing the same issue here. It seems the method signature in MailKit changed. |
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. |
I installed Serilog.Sinks.Email with NuGet Package Manager from Visual Studio 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. |
I have the same version as you, but still having the problem, it doesn't send any email. |
My Project settings are:
@fakhrulhilal Can you post the project which is not working? Then I will take a look. |
Related to #107 |
still got the same issue. I have installed
|
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! |
My project settings:
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(IEnumerable
1 events) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Serilog.Sinks.Email.EmailSink.EmitBatchAsync(IEnumerable
1 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 text was updated successfully, but these errors were encountered: