You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ,
I am using version 9.0.1 before upgrading to that version I haven't faced with any issue.It seems now It doesn't work with native smtp client anymore.
Here is my config
var options = new SmtpServerOptionsBuilder()
.ServerName(_smtpSettings.Server)
.Endpoint(
endpointBuilder =>
{
endpointBuilder.Port(9028, false).AllowUnsecureAuthentication(true).AuthenticationRequired();
}
).Build();
serviceProvider.Add(new SampleUserAuthenticator());
var server = new smtp.SmtpServer(options, serviceProvider);
Smtp client code
var client = new SmtpClient
{
Port = 9028,
Host = "localhost",
UseDefaultCredentials = false,
DeliveryMethod= SmtpDeliveryMethod.Network
};
client.Credentials = new NetworkCredential("test", "test");
var mail = new MailMessage
{
From = new MailAddress("[email protected]"),
Subject = "Smtp Server Test",
Body = "Smtp Server Test",
IsBodyHtml = true
};
mail.To.Add(new MailAddress("[email protected]"));
//CreateAttachments(mail);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.Send(mail);
return Task.CompletedTask;
Never hitting SampleUserAuthenticator and gives following error
System.Net.Mail.SmtpException: 'The SMTP server requires a secure connection or the client was not authenticated. The server response was: authentication required'
The text was updated successfully, but these errors were encountered:
Hi ,
I am using version 9.0.1 before upgrading to that version I haven't faced with any issue.It seems now It doesn't work with native smtp client anymore.
Here is my config
var options = new SmtpServerOptionsBuilder()
.ServerName(_smtpSettings.Server)
.Endpoint(
endpointBuilder =>
{
endpointBuilder.Port(9028, false).AllowUnsecureAuthentication(true).AuthenticationRequired();
Smtp client code
var client = new SmtpClient
{
Port = 9028,
Host = "localhost",
UseDefaultCredentials = false,
DeliveryMethod= SmtpDeliveryMethod.Network
};
client.Credentials = new NetworkCredential("test", "test");
Never hitting SampleUserAuthenticator and gives following error
System.Net.Mail.SmtpException: 'The SMTP server requires a secure connection or the client was not authenticated. The server response was: authentication required'
The text was updated successfully, but these errors were encountered: