lukencode / FluentEmail

All in one email sender for .NET. Supports popular senders (SendGrid, MailGun, etc) and Razor templates.

Home Page:https://lukelowrey.com/dotnet-email-guide-2021/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System.MissingMethodException when using MailKit 3.0.0

mm-rpodstawa opened this issue · comments

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

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)

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

Is anyone else experiencing this issue?

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.

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

There are only really two solutions to this issue;

  1. Wait for a new release
  2. Clone the repo and build it yourself
commented

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

please fixed it. :)