so i am trying to connect my server from dotnet6.0 but it takes a long time and after that it just won’t connect! Here is my code :
using var smtp = new SmtpClient();
smtp.Connect("mail.uri.com", 25, SecureSocketOptions.StartTls);
smtp.Authenticate("username", "password");
smtp.Send(email);
smtp.Disconnect(true);
it stuck at fisrt line (smtp.Connect
) and won’t go further
i have expected to link to the server and send an email to the target ’email’, but it stuck at smtp.Connect
New contributor
Mohammad Ali Ghasemian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.