Cannot send mails from contact form

Status
Not open for further replies.

fonzi

New Member
My site is hosted by register365. I have a contact form on it where someone enters their name, email address and a subject and message content. It is sent by the back-end code (it is an ASP.NET site). It was working before but since register365 moved over to Windows 2012 it gives me an exception:
"An attempt was made to access a socket in a way forbidden by its access permissions"
There is a file on the server in my folder called "web.config" (some of you may be familiar with this file already). The register365 smtp server name (smtp.reg365.net) is entered into this file and any emails that are sent from the contact form use this server name. No usernames or passwords or anything else needs to be entered, just the smtp server name.
It is not a coding problem as I changed it around to different suggestions I found online and I get the same exception. I have tried the site locally on my own pc and it sends the mails from the contact form perfectly (although I have to change the smtp server name to the one my own ISP uses).
I think from the error message I am getting that there must be a firewall on the server that is not allowing me to send the mail. This seems extraordinary as surely lots of others with sites hosted would use contact forms and therefore also need to use the smtp server?
Before I logged a ticket about it I said I would ask here first in case someone has had the same issue (I searched the forum but couldn't find anything on it).
 

fonzi

New Member
It's OK now.
Came across this link while I was googling for an answer:http://www.register365.com/knowledge/hosting/technical_reference/customer_guides_reference/linux_hosting/918-why_cant_i_use_external_mail_servers_on_my_website.html

From that page I saw the text "the only way in which websites hosted with us will be able to send email from our servers will be via localhost." I put in localhost instead of smtp.reg365.net to the web config file and after that everything was OK.
 
Status
Not open for further replies.
Award-winning Mac antivirus and Internet security software
Top