Author: TRU | Posted on: 9/24/2009 7:54:37 PM | Views : 384

 See my code behind below...
Why when I receive the email from the below code is the email FROM user@somedomain.com and not the email address from "cEmail"?  This actually worked correctly before making changes to this code to work with gmail and authentication.
Regards,
TRU
Imports System.Net.Mail Partial Class _contactus Inherits System.Web.UI.Page Sub Send2Mail(ByVal sender As Object, ByVal e As FormViewInsertedEventArgs) If IsValid Then 'create the mail message Dim mail As New MailMessage() 'Get From address and form contents Dim cEmail As String Dim strBody As String cEmail = (CType(contactusFRM.FindControl("cEmailTextBox"), TextBox)).Text 'set the addresses mail.From = New MailAddress(cEmail) ma ...

Go to the complete details ...