Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys,

I got roped into helping out a friend with an ASP website, I'm a php guy so I'm pulling my hair out! Since migrating the hosting for this asp website the online inquiry form has stopped working, I've updated the web.config settings to the new hosting details as below:

C#
<appSettings>
<add key="sitelevel" value="2"/>
<add key="sign" value="$" />
<add key="siteurl" value="http://www.domain.com/" />
<add key="fromemail" value="sales@domain.com" />
<add key="mailusername" value="sales@domain.com" />
<add key="mailpassword" value="removed" />
<add key="mailserver" value="mail.domain.com" />
</appSettings>


Whenever someone submits the enquiry it just returns the error:

"Failure sending mail."

I've used telnet to connect to the mail server on port 25 and it seems to work just fine.

I'm bashing my head against a wall here so any advice on where to look would be much appreciated.
Posted
Comments
_Damian S_ 14-Dec-11 20:25pm    
You probably need to include the form submission code rather than the appsettings...

Hi,

You may see this link if could help.

mail concept in asp.net


Please do not forget to vote if help, so that others may consider as answer...

Al Moje
Regards,
 
Share this answer
 
Comments
arkter 14-Dec-11 20:38pm    
Hi Al, thanks for the help, the only thing that has changed on the website is the hosting arrangement, so I'm assuming there is a variable somewhere I have missed that may be outside the web.config file... do you have any idea where else I need to look?
Al Moje 14-Dec-11 21:00pm    
I would suggest to check the mailserver value and siteurl if existing...
arkter 14-Dec-11 21:03pm    
mailserver definately exists and I can telnet into it using port 25
Al Moje 14-Dec-11 21:11pm    
is there a seting for
SMTP_Address = ip address of the mail server...
arkter 14-Dec-11 21:34pm    
nope, should I add this in the app settings?
it currently has: <add key="mailserver" value="mail.domain.com">
should I ad : <add key="SMTP_Adress" value="ip"> ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900