var client = GetSmtpClient();
client.SendAsync(message);
static SmtpClient GetSmtpClient()
{
var host = Config.MailSettings.PrimaryProvider.Host;
var port = Config.MailSettings.PrimaryProvider.Port;
var username = Config.MailSettings.PrimaryProvider.Username;
var password = Config.MailSettings.PrimaryProvider.Password;
var client = new SmtpClient(host, port, username, password, SecurityOptions.SSLExplicit);
client.AllowedAuthentication = SmtpKnownAuthenticationType.Login;
return client;
}
To ensure a timely and accurate response, please attach the following resources here for testing:
Your input data.
Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.
As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.
PS: To attach these resources, please zip and upload them.
It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Email, we will be happy to help you.