Last post Apr 07, 2009 01:38 AM by ilearn
Apr 05, 2009 11:24 PM|ilearn|LINK
I am trying to send to write a code to send email, but I'am getting this error :
5.7.3 Requested action aborted; user not authenticated
Here is my code, and I need your help
MailMessage email = new MailMessage(strFrom,strTo);
email.Subject = strObj;
email.Body = strBody;
email.Priority = MailPriority.High;
SmtpClient client = new SmtpClient();
client.EnableSsl = true;
return "Message Sent";
catch (Exception ex)
<network "smtphm.sympatico.ca" userName="MyFirstName.MyLastName@sympatico.ca" password ="MyPwd" port="25" defaultCredentials="true">
Apr 06, 2009 03:50 AM|worldspawn|LINK
Try removing defaultCredentials="true" from the the <network element.
I don't know for sure but that would seem to imply it would authenticate with something other than the username and password you have defined there.
Apr 06, 2009 03:56 AM|whighfield|LINK
Along with the previous poster remove the SSL = true, this only applies if smtphm.sympatico.ca accepts SSL over port 25 which it probably does not.
Also if this code is running outside of the smtphm.sympatico.ca network (like your website) it might not work as sympatico.ca might not allow outside networks to send email through their SMTP servers.
Apr 07, 2009 01:21 AM|ilearn|LINK
Thank you for helping me, I've removed both SSL=true and defaultcredentials="true" but now i am getting the following error :
Le serveur SMTP requiert une connexion sécurisée ou le client n'était pas authentifié. La réponse du serveur était : 5.7.0 Must issue a STARTTLS command first
Apr 07, 2009 01:27 AM|ilearn|LINK
one more thing, i develop the application at home and i've used the correct smtp.
Apr 07, 2009 01:38 AM|ilearn|LINK
I told you earlier that I've removed SSL=true and defaultcredential=true, I've put again
client.EnableSsl = true; so the only thing to remove is defaultcredential=true
and it works
Thank you so much