I am trying to send an email from my project, but I'm having some trouble...
I'm using this code:
private void SendMail()
{
MailMessage mail = new MailMessage(MailSender, MailReciever, MailSubject, MailContent);
SmtpClient client = new SmtpClient(SMTPServer);
client.Send(mail);
}
Then I get an exception :
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated
I don't know what to do. Any suggestions ? What am I doing wrong ?
I don't know what to doperhaps you could have looked at theRelatedsection on this page as well as do a Stackoverflow search for the topic since there are tons of answers as well as working examples.. lack of effort I must sayEtrit