SmtpClient, send email through smtp.gmail.com, but From another account.

Posted by dynback.com on Stack Overflow See other posts from Stack Overflow or by dynback.com
Published on 2010-04-07T16:27:54Z Indexed on 2010/04/07 16:43 UTC
Read the original article Hit count: 355

Filed under:
|

I wonna send email through gmail smtp, but users should see my corporative "From"

SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
smtp.EnableSsl = true;
smtp.Credentials = new NetworkCredential("[email protected]", "pass", "mail.dynback.com");

I am getting SmtpException: "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required"

I heard its all possible and called "Relay", but I am not sure, do i need to put somehow google credentials?

© Stack Overflow or respective owner

Related posts about smtp

Related posts about smtpclient