It is suggested to use the ABP CLI to install this package. Open a command line window in the folder of the project (.csproj file) and type the following command:
abp add-package Volo.Abp.MailKit
If you haven't done it yet, you first need to install the ABP CLI. For other installation options, see the package description page.
IEmailSenderis the suggested way to send emails even if you use MailKit, since it makes your code provider independent.
MailKit package also exposes the
IMailKitSmtpEmailSender service that extends the
IEmailSender by adding the
BuildClientAsync() method. This method can be used to obtain a
MailKit.Net.Smtp.SmtpClient object that can be used to perform MailKit specific operations.
MailKit integration package uses the same settings defined by the email sending system. So, refer to the email sending document for the settings.
In addition to the standard settings, this package defines
AbpMailKitOptions as a simple options class. This class defines only one options:
- SecureSocketOption: Used to set one of the
null(uses the defaults).
Example: Use SecureSocketOptions.SslOnConnect
options.SecureSocketOption = SecureSocketOptions.SslOnConnect;
Refer to the MailKit documentation to learn more about this option.
Thank you for your valuable feedback!
Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.