Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- email from someaddress@company.com in asp.net using gmail SMTP authentication
- msg.From = new MailAddress(gMailAccount);
- NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password)
- <mailSettings>
- <smtp from="someone@companyname.com">
- <network enableSsl="false" host="smtp.gmail.com"
- password="secretone" port="25" userName="user@gmail.com" />
- </smtp>
- </mailSettings>
- var smtp = new SmtpClient();
- smtp.Send(new MailMessage("someone@companyname.com", "to@domain.com")
- {
- IsBodyHtml = true,
- Subject = "Some subject",
- Body = "add html code here"
- });
Add Comment
Please, Sign In to add comment