- This topic is empty.
September 29, 2009 at 4:14 pm #26284slaceyMember
I used Chris’ simple contact form for a website. It work absolutely fine on my server but when the client uploads it to their server, which is a windows server, its having problems. Instead of redirecting to the Success page, it redirects to the Error page but apparently the recipient is receiving emails. I don’t know why or how to stop it from redirecting to the error page, or to stop the error if that’s whats happening.
EDIT: Correction, they are not receiving the emails, which means its not working at all.
This is the code in the HTMLCode:
The contact engineCode:“;
// prepare email body text
$Body = “”;
$Body .= “Name: “;
$Body .= $Name;
$Body .= “n”;
$Body .= “Email: “;
$Body .= $Email;
$Body .= “n”;
$Body .= “Message: “;
$Body .= $Message;
$Body .= “n”;
// send email
$success = mail($EmailTo, $Subject, $Body, “From: <$EmailFrom>“);
// redirect to success page
Chris added a mod by Toni for windows server but I’m not sure if I’m using it correctly.Code:/* Modification by Toni for Windows servers */
ini_set(“sendmail_from”, “[email protected]”);
Should I put it in the contact engine at the end? Also, do I replace "[email protected]" with the Send To email?
Please help!September 29, 2009 at 7:17 pm #64842slaceyMember
Ok, I’m going to explain this a little more.
I built a very simple website for a client using php includes, html, and css. Very simple. The form works fine on my development server.
I gave it to the client to put on their own server. They’re using a Windows server. Everything except the contact form works. He’s a IT guy who knows all the server stuff but nothing about PHP or building websites. We’re trying to communicate to figure out the problem but we don’t know what the other is talking about most of the time. I asked if they use SMTP for their email and he said: "SMTP is not installed but we have an internal exchange server for our email. The websites that we have use this server to connect and send email through. I went ahead and install smtp anyways." Basically, I have no idea what this means and how to make it work.
The code I showed in the above comment is exactly what’s on the website. I guess my main question is: What does he need to do to fix it on his end? Or what do I need to do on my end to fix it?
Please help if you can! Thank you!November 24, 2012 at 7:25 am #115312izzywizzyMember
Please did anyone resolve this issue, I am having the same problemApril 4, 2013 at 7:43 am #130632MarkHolbrookMember
Not sure if you have already sorted your issue, I have had the exact same problem and been scratching my head for days. I found a fix that works perfectly: (taken from another forum)
Fyi – I found the fix in the php manual, on a forum:
Under windows there is a bug in php/mail
See here: http://bugs.php.net/bug.php?id=28038
this results in you being unable to send ‘From: Full Name ‘
Set the following before calling the mail function:
ini_set(‘sendmail_from’, ‘[email protected]’);
Hope this helps
MarkApril 4, 2013 at 11:43 am #130652EricMember
Does the form have any validation? From its demo its seems no.
- The forum ‘Back End’ is closed to new topics and replies.