The following is my code for sending email in contact us page of my website.
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage(); msg.From = new MailAddress(emailid.Text); msg.To.Add("[email protected]"); msg.Subject = subject.Text; msg.Body = txtBody.Text; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtp.gmail.com"; smtp.Port = 587; smtp.Credentials = new System.Net.NetworkCredential("[email protected]", "mygmailpassword"); smtp.EnableSsl = true; smtp.Send(msg);in my inbox of [email protected], i just received the message from [email protected]. but i want to get mail from email.txt(where somebody enter their email id).how can change that thing.
Rasadul Alam RashedPosted Mar 28, 2013, 1:50 AM
for more details with source code: http://cybarlab.com/send-e-mail-using-c-sharp
Thanks n regard
Satyapriya NayakPosted Mar 23, 2013, 7:54 AM