Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 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 December 29th, 2015, 12:44 AM
Authorized User
 
Join Date: May 2013
Posts: 59
Thanks: 10
Thanked 0 Times in 0 Posts
Default smtp settings in webconfig file

I have a question-scenario and I would like your help. I am posting in this forum because I learned aspnet from the great book of Imaar (beginning aspnet 4.5) and I have built my website following the exercises in the book!

here is the scenario:
let's say that you are controlling the aspnet project of the customer plus the dedicated server . The server is a dedicated server (plesk control panel-version 12) at godaddy.

The website owner's website has a contact form where a user can submit it and send the comment/questions to him (the website owner).
In the webconfig file of the project ithere is something like that:

<smtp deliveryMethod="Network" from="Webmaster &lt;websiteowner@yahoo.com&gt;">
<network host="dedrelay.secureserver.net" port="25" />


The dedrelay.secureserver.net at webconfig file above is the server info that godaddy gave to the website owner.
However when a user submits the form, the e mail is not sent to the address defined at webconfig (websiteowner@yahoo.com)....because godaddy dedicated server uses its own default mail server.
so the website owner wants to use an external mail server (yahoo mail server) in Plesk instead of the default server.
how would you add the external server at plesk and how you would change the MX records in order to be able to receive the emails from the website forms into his yahoo mail account?
Does this make sense?

for example for smtp settings , where would you point your MX records etc?
 
Old January 10th, 2016, 12:18 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

>> Does this make sense?

No, not at all. What are you asking?

This:

>> However when a user submits the form, the e mail is not sent to the address defined at webconfig (websiteowner@yahoo.com)....because godaddy dedicated server uses its own default mail server.

makes no sense to me. The yahoo address is a *from* address (used as a fallback) not a To address. You can send mail wherever you want regardless of the SMTP host used to send it.


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!
 
Old January 10th, 2016, 12:32 PM
Authorized User
 
Join Date: May 2013
Posts: 59
Thanks: 10
Thanked 0 Times in 0 Posts
Default

When i set the toaddress to a yahoo address the contact form does not send the inquiry to the yahoo address. It sends it from the website but it is never delivered.
 
Old January 10th, 2016, 12:34 PM
Authorized User
 
Join Date: May 2013
Posts: 59
Thanks: 10
Thanked 0 Times in 0 Posts
Default

But no worries.
I figured out i think.
It has to do with my settings on the server, not the webconfig
 
Old January 10th, 2016, 03:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Ah see (I think). Go Daddy or Yahoo may be rejecting the mail because the from address doesn't match the domain or server where the mail originates.

My book describes how to add SMTP settings for other mail servers like Yahoo and Gmail. Not sure how to do it through Plesk but I assume they have a UI somewhere to register mail servers.

Cheers,

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web.Config SMTP Settings vbboyd BOOK: Beginning ASP.NET 4.5 : in C# and VB 13 October 6th, 2014 03:20 PM
Declare a variable attribute in WebConfig snufse ASP.NET 2.0 Basics 2 January 12th, 2008 11:10 AM
Changing Settings.settings when assembly is in GAC evandro.paula .NET Framework 2.0 0 September 25th, 2007 09:54 AM
Trouble with UrlMapping in webconfig ! bananas ASP.NET 2.0 Professional 3 August 30th, 2006 12:47 AM





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