FluentEmail icon indicating copy to clipboard operation
FluentEmail copied to clipboard

Method not found: 'Void MailKit.MailTransport.Send(MimeKit.MimeMessage, System.Threading.CancellationToken, MailKit.ITransferProgress)'.

Open neozhu opened this issue 3 years ago • 3 comments

services.AddFluentEmail(mailSettings.From) .AddRazorRenderer() // this configuration is working .AddSmtpSender(new System.Net.Mail.SmtpClient() { Host = mailSettings.Host, Port = mailSettings.Port, EnableSsl = mailSettings.UseSsl, Credentials = new System.Net.NetworkCredential(mailSettings.UserName, mailSettings.Password) }); // this configuration with Mailkit not working. //.AddMailKitSender(new FluentEmail.MailKitSmtp.SmtpClientOptions() //{ // RequiresAuthentication = !string.IsNullOrEmpty(mailSettings.UserName), // UsePickupDirectory = false, // Password = mailSettings.Password, // Port = mailSettings.Port, // Server = mailSettings.Host, // User = mailSettings.UserName, // UseSsl = mailSettings.UseSsl, //});

Method not found: 'Void MailKit.MailTransport.Send(MimeKit.MimeMessage, System.Threading.CancellationToken, MailKit.ITransferProgress)'. why?

neozhu avatar Apr 27 '22 05:04 neozhu

Yes. I have exact same issue. I'm very surprised that the author @lukencode has not responded at all since April. I guess it's time not to use this nugget packages

ghost avatar Aug 25 '22 14:08 ghost

For me, this issue happens when I have MailKit version 3.0.0 or greater installed.

It looks like MailKit 3.0.0 changed the signature to return a string instead of a void. Link to commit

tigrin avatar Oct 19 '22 12:10 tigrin

This is a duplicate of #296 You can close the issue and move this conversation to issue above.

AdisonCavani avatar Nov 08 '22 16:11 AdisonCavani