views:

274

answers:

2

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?

A: 

You'll have to use a Google account for the credentials. You should be able to set the From or ReplyTo address in your MailMessage to whatever you want.

Austin Salonen
Its sending, but i see no [email protected] in From. Looks like found a solution: http://blog.abettergeek.com/server-management/windows-server-2008-r2-smtp-and-gmail-for-domains-or-how-i-learned-to-let-go-and-love-smart-hosts/
dynback.com
A: 

Use "Save As" feature in gmail.

dynback.com