|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problems with an HTML/ASP contact form
Hi, I have a problem with receiving emails through the contact form on my site. I'll try to give you as much information as possible.
I have a contact form on my website. It's on an htm page called 'contact.htm' and it's set up to read from 'contactform.asp' when the user clicks the submit button. When that happens the information the user entered should be emailed to me and the user should be redirected to 'thankyou.htm'. Up until a few weeks ago everything was working as it should. I have Google Analytics running and I was informed that someone filled in the contact form on my site. However, I didn't receive any emial. The same thing happened a few days later. At that time the email address the information should've been sent to was a Yahoo address. I thought there may have been problems at Yahoo's end so I contacted them and asked them. Unfortunately corresponding with anyone at Yahoo "customer service" is like pulling teeth and they ended up responding to a completely different question from the one I asked. I changed the destination email address to be on the safe side. My website is hosted with easyspace so I changed the destination email address to one associated with my domain name. I tested it a few times and everything seemed fine. A couple of people emailed me through the contact form I received both emails without any problems. However, earlier today someone filled in the contact form and I haven't received the email. I've contacted Easyspace and I await their reply. It occurs to me that they may have made some updates to their server, which would render the code on my form obselete or at least made it hit and miss. They deny this but I was hoping you could look at the code and tell me if I'm doing anything wrong. The enquiry emails I'm missing out on are business enquiries so the problem is very frustrating. The first line of my form on contact.htm is: Code:
<form name="contact" method="post" action="contactform.asp"> The code on 'contactform.asp' is: Code:
<html>
<body>
<%
' Check that the form has been submitted, and if it has, sort out and send the email. To do this we check the count for the submit button. If the button has been pressed, its count will be greater than 0
Response.Buffer = true
' Create the message for the email
strMessage="A user has filled in the Contact Form on Joe's website." & VbCrlf
strMessage=strMessage & "Here is the information the user entered:" & VbCrlf & VbCrlf
strMessage=strMessage & "Name: " & Request("name") & VbCrlf
strMessage=strMessage & "Email: " & Request("email") & VbCrlf
strMessage=strMessage & "Telephone: " & Request("telephone") & VbCrlf
strMessage=strMessage & "Enquiry: " & Request("enquiry") & VbCrlf
' Create email object and set all the values, setting the from address to be the person who filled in the form
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Joe Information Request"
myMail.From=Request("email")
myMail.To="info@joeswebsite.net"
myMail.TextBody=strMessage
myMail.Send
set myMail=nothing
'Redirect to Thank you page
response.redirect "thankyou.htm"
%>
</body>
</html>
Do you see any problems with the code that would make it work one day and fail to work the next? Any help you could give me would be greatly appreciated. This problem is seriously effecting my business. Regards, Joe. |
|
#2
|
|||
|
|||
|
Something has occurred to me.
I didn't have any problems with my contact form until a few weeks ago. At that time I made a few changes to the text on the contact page and uploaded the updated page. I didn't touch the form or any of the code, I just changed a few prices on the other side of the page. When the new page was uploaded the problems started. After I changed the destination email address the problems subsided and I was receiving enquiries through the form as normal. A few days ago I changed one or two prices again and uploaded the updated page and now the form isn't working at all. Is it possible that Easyspace have made some changes to their server that makes my form hit and miss, and that by uploading the contact page I'm bringing this code to the attention of the server? That's the only reason I can think of for a form to just stop working over night. |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > Problems with an HTML/ASP contact form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|