change sender address when sending mail through gmail in c#
This is the solution: use the codes above to set mail.From = new MailAddress(address, display name) in Gmail, go to Mail Settings >> Accounts and Import. Add the email account you will use as sender in “Send Mail As”. (tick as Alias) This works for me