Posted on: 9/17/2012 3:34:49 AM | Views : 266

Would this code eventually be problematic? Essentially, using my mail account, I will be sending an email on someone else's behalf. In other words, even though "John@yahoo.com" actually wrote to "Bob@gmail.com", he didn't send it. We sent it through our webform.
I didn't want to use MailMessage.ReplyTo because the From Address will be 'no-reply@' instead of the actual buyer email address.
What's odd is that it works when I send an email to my gmail account, but when it's to a yahoo account, I never receive the email.
Thanks.
protected void Button1_Click(object sender, EventArgs e) { SmtpClient smtp = new SmtpClient(); smtp.Host = "127.0.0.1"; smtp.Port = 26; smtp.Credentials = new NetworkCredential("no-reply@mycompany.com", password); MailMessage m = new MailMessage(); m.From = new MailAddress("John@yahoo.com", "John Yahoo", Encoding.UTF8); m.To.Add(new MailAddress("Bob@gmail.co ...

Go to the complete details ...