Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
January 27, 2011
i m having enquiry form in my website.
after clicking the submit button the mail goes to the correct mail address but the in 'from' tag its showing the same email address as that of the destination mail address
thus 'to' and 'from' has the same email address inspite of the different address filled in the form.
the code of the button_click() is as below:
protected void btnSend_Click(object sender, EventArgs e)
MailMessage msg = new MailMessage();
msg.From = new MailAddress(txtEmail.Text);
msg.Subject = txtSubject.Text;
msg.Body = txtName.Text + Environment.NewLine + txtMessage.Value;
SmtpClient client = new SmtpClient();
client.Host = "smtp.xyz.com";//Place your smtp server in quotation marks (i.e. "smtp.live.com")
client.Port = 587;// Place your smtp port here, i.e. hotmail's smtp port is 587
client.Credentials = new NetworkCredential("username","password");
client.EnableSsl = true;
plz help to resolve.
Posted Date: January 30, 2011 Points: 5
Thats strange..Check the from email address properly..It can not be the same.
Mark As Answer
" if this post help you.
Posted Date: February 01, 2011 Points: 5
Please check are you entering the same address in the textbox.
Digitalmesh Softech India (p) Limited
To post reply
Related Questions Related Questions
How to Send Mail Asynchronously in asp.net
how to send e-mail from site to admin
How to validate textBox for E-mail Id in C#.net
.NET Service Application - Sending mail to 2,634,789 users
difference between system.web.mail and system.net.mail?
Automatic Mail Send on Scheduled Date time in Asp.net
Send Mail Promting throw out-look
Latest Forum Questions From The Same Category
Slash(/) in Combobox
attaching the report in the web page
How do i get payment status in redirect page using bitpay?
Login with Facebook and Save details in database
Login with facebook account in my website
How to make a nested datalist control?
What class does Icon derive from?
What are the validation controls?
What''s the difference between an interface and abstract class?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend