im trying to send an email using my google apps account,
and i keep getting this error:
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required
when i try the same code with a normal gmail account this works.
var msg = new MailMessage();
msg.IsBodyHtml = true;
msg.Subject = "subject here";
msg.Body = "body here";
msg.To.Add("email adress here");
var client = new SmtpClient();
client.EnableSsl = true;
client.Send(msg);
You need to connect to Gmail’s SMTP server on port 587 and specify an SSL connection
http://support.google.com/mail/bin/answer.py?hl=en&answer=13287