Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > ASP.NET 4.5 General Discussion
|
ASP.NET 4.5 General Discussion For ASP.NET 4.5 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4.5 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2014, 12:42 AM
Authorized User
 
Join Date: May 2013
Posts: 59
Thanks: 10
Thanked 0 Times in 0 Posts
Default about e mail address for contact form and for error logging

in book "beginning aspnet 4.5" it shows how to send an email from the contact form to your email and in another section how to get an e mail when something bad happens with your site that shows you the errors.

what if you want these email addresses to be different.
I don't remember where exactly in the webconfig file you have to set the e mail address that receives the email from the contact form and where you set the e mail address to send you the errors of your website....

can they be different?
please help
 
Old October 14th, 2014, 05:41 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Here's what you would need to do:

1. Add new keys to the <appSettings> element in web.config for the e-mail addresses and names you want to support.

2. To AppConfiguration.cs / vb add properties to wrap the config values just like the existing ones.

3. In the code that sends the various e-mails, pick the appropriate property from the AppConfiguration class.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
dksellou (October 14th, 2014)
 
Old October 14th, 2014, 08:55 PM
Authorized User
 
Join Date: May 2013
Posts: 59
Thanks: 10
Thanked 0 Times in 0 Posts
Default

Thank you so much!
I will do!

P.S. What a great forum indeed!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Contact form to email error Bazmo BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 February 3rd, 2011 02:50 PM
Chapter 9: The specified string is not in the form required for an e-mail address. gfmann BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 April 21st, 2009 09:49 PM
Error With Contact Form ASP.NET 3.5 CSharpCoder BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 July 28th, 2008 04:08 PM
Mail Round Trip Logging acdsky VB How-To 1 January 14th, 2005 09:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.