views:

130

answers:

3

Hi

I have an email form that isn't sending out an email to the recipient or a copy to the client. The form can be found at www.kelcos.co.uk/contact and the files associated with this are:

/index.php /jquery.js /sendemail.php /submitform.php /thanks.php /verify.php

I have used this form on other websites http://www.bowlesgreen.co.uk/contact/ and http://www.arbortectreecare.co.uk/contact/ and it works fine - the only difference is that these other sites use my usual hosting provider and for the one that won't send I'm working through the clients hosting provider, which I can only presume is what is causing the problem.

I have contacted the hosting and so far we have eliminated a few things such as:

  • 'The limitation to our systems is that the emails sent using scripts will be blocked if they are not going to or coming from an email address setup on the web hosting account. - so I am now sending the form to an a kelcos.co.uk address, but still no joy.

  • PHP/ASP was originally disabled, but now has been activated

  • the mail() script is enabled

I would really appreciated any advise any of you could offer.

Thanks

A: 

Is Qmail available on the server? Are you setting the headers properly?

Try something like the following:

putenv ("QMAILUSER=myuser");
putenv ("QMAILNAME=My Name");
putenv ("QMAILHOST=mydomain.com");

$headers = 'From: My Name <[email protected]>' . "\r\n" .
'Reply-To: My Name <[email protected]>' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

$mail_to = '[email protected]';
$subject = "Testing email";
$body = "This mail is a test";
mail($mail_to, $subject, $body, $headers);

And see if you receive an email!

Evernoob
+1  A: 

No, http://www.bowlesgreen.co.uk/contact/ doesn't work fine as you said. Firebug reports: POST http://www.bowlesgreen.co.uk/projects/wp/wp-content/themes/bowlesgreen/contactform/sendemail.php 404 Not Found

Your forms are submitting to the wrong URL.

Tom
A: 

try these

http://forum.codecall.net/php-forum/28696-php-contact-form-isnt-sending-out-email.html http://www.astahost.com/info.php/Php-Send-Email-Problem_t2259.html

udsha