Yes, So you need to set these up to your own settings before you deploy the site.
Thank you for continue with me all the time i nthis thread.I tested the settings in an online website and it works fine.I used the same email in both settings(mailTo and from) and it works.I don't know how this become possible but it is working fine anyway.The
email in the textbox will appear as it is the sender too when you receive the email.This is realy great.If any one know how this become possible please explain to us.
"If any member find my post helpfull for him please mark it as answer".
Let me try another way to answer your question in the contact.aspx.cs you have
msg.From = new MailAddress(txtEmail.Text, txtName.Text);
Setting the from address to the txtemail textbox vale
And then you have
msg.To.Add(new MailAddress(Globals.Settings.ContactForm.MailTo));
Which is getting the value from the web.config contactForm mailTo="thebeerhouse@wrox.com"/
Then you also have the from address setup in the web.config for the newsletter.
And then final you have the smtp settings in the web.config, which is used for things like forgot password
and anyother general email setting with a from address.
Hope it helps
Regards
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
TheEagle
Member
71 Points
482 Posts
Re: contact page-sending from user email?!
Jul 15, 2008 11:04 AM|LINK
Thank you for continue with me all the time i nthis thread.I tested the settings in an online website and it works fine.I used the same email in both settings(mailTo and from) and it works.I don't know how this become possible but it is working fine anyway.The email in the textbox will appear as it is the sender too when you receive the email.This is realy great.If any one know how this become possible please explain to us.
"If any member find my post helpfull for him please mark it as answer".
jeremyh
Star
8173 Points
1477 Posts
Re: contact page-sending from user email?!
Jul 15, 2008 11:30 AM|LINK
Glad that you are happy.
Let me try another way to answer your question in the contact.aspx.cs you have
msg.From = new MailAddress(txtEmail.Text, txtName.Text);
Setting the from address to the txtemail textbox vale
And then you have
msg.To.Add(new MailAddress(Globals.Settings.ContactForm.MailTo));
Which is getting the value from the web.config contactForm mailTo="thebeerhouse@wrox.com"/
Then you also have the from address setup in the web.config for the newsletter.
And then final you have the smtp settings in the web.config, which is used for things like forgot password
and anyother general email setting with a from address.
Hope it helps
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.