Skip to content
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

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

Open
neozhu opened this issue Apr 27, 2022 · 3 comments

Comments

@neozhu
Copy link

neozhu commented Apr 27, 2022

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?

@ghost
Copy link

ghost commented Aug 25, 2022

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

@tigrin
Copy link

tigrin commented Oct 19, 2022

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

@AdisonCavani
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants