lukencode / FluentEmail

All in one email sender for .NET. Supports popular senders (SendGrid, MailGun, etc) and Razor templates.
https://lukelowrey.com/dotnet-email-guide-2021/
MIT License
3.04k stars 438 forks source link

System.MissingMethodException when using MailKit 3.0.0 #296

Open mm-rpodstawa opened 2 years ago

mm-rpodstawa commented 2 years ago

I have upgraded MailKit to v3.0.0 and I when I send email get this exception:

System.MissingMethodException: 'Method not found: 'System.Threading.Tasks.Task MailKit.MailTransport.SendAsync(MimeKit.MimeMessage, System.Threading.CancellationToken, MailKit.ITransferProgress)'.'

When I back to MailKit v2.15.0, everything works good again

mortenn commented 2 years ago

Related exception I am seeing:

System.MissingMethodException: Method not found: 'Void MailKit.MailTransport.Send(MimeKit.MimeMessage, System.Threading.CancellationToken, MailKit.ITransferProgress)'.
   at FluentEmail.MailKitSmtp.MailKitSender.Send(IFluentEmail email, Nullable`1 token)
   at FluentEmail.Core.Email.Send(Nullable`1 token)
dotnetshadow commented 2 years ago

Any update on this issue?

@lukencode I think some methods might have been removed https://github.com/jstedfast/MailKit/blob/master/ReleaseNotes.md#mailkit-300-2021-12-11

MailKit 3.0.0 (2021-12-11) Removed APIs marked as [Obsolete] in 2.x.

Similar issue documented here: MailKit's SmtpClient.SendAsync() method changed its API signature between 2.x and 3.0. It used to return Task, now it returns Task<string>. https://stackoverflow.com/questions/70886057/serilog-writeto-email-failing

dotnetshadow commented 2 years ago

Is anyone else experiencing this issue?

zaha commented 2 years ago

Is anyone else experiencing this issue?

Yes, same issue here. I'm also waiting for this to be resolved, but there seems to be little activity in this project, which is why I'm considering dropping FluentEmail and using MailKit directly. Despite liking the simplicity and syntax, I need a mail library that is well maintained and supported.

cchance27 commented 2 years ago

Running into this same issue, any word on a workaround besides backing down to mailkit 2.15?

mortenn commented 2 years ago

There are only really two solutions to this issue; 1) Wait for a new release 2) Clone the repo and build it yourself

Jogai commented 2 years ago

@lukencode Can you elaborate on the status of the project?

neozhu commented 1 year ago

please fixed it. :)