I am creating a contact us page, and i want to receive mails from this page as its a mail came from the user mail.
I wrote this code:
var client = new SmtpClient("smtp.gmail.com", 587)
{
Credentials = new NetworkCredential("[email protected]", "password"),
EnableSsl = true
};
MailMessage mail = new MailMessage();
mail.From = new MailAddress("[email protected]");
mail.To.Add(new MailAddress("[email protected]"));
mail.Body = "bodyTest";
mail.Subject = "subjectTest";
client.Send(mail);
But i receive the mail from my mail not the user
How to do this?