This appears to by a problem with the mail function. When I comment out the lines:
if (mail($recipient, $subject, $message, $headers))
   echo 'Succeeded<br>';
   else
   echo 'Error - please check your e-mail address<br>';

and replace them with:
   echo $recipient . '<br><br>';
   echo $subject . '<br><br>';
   echo $message . '<br><br>';
   echo $headers . '<br><br>';
it displays to the screen perfectly every time.

Here's the output (ignore the hyperlinks, my news reader created those, in the browser they are plain text):
candid...@someparty.org

message subject

message body blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah

From: steph...@qcoss.org.au Reply-To: steph...@qcoss.org.au X-Mailer: PHP/ 5.1.1 Cc: steph...@qcoss.org.au, takeact...@qcoss.org.au


thanks

""Stephen Hutchison"" <steph...@qcoss.org.au> wrote in message news:bc.e4.19118.b059d...@pb1.pair.com...
I've set up a small website which allows users to create a form letter and email it to their local candidates in the upcoming state election.

The user enters their email address, town/suburb and message into an html form and clicks the Send button. The site then sends an email to each candidate for their area. The email is plain text and only about 3k in size.

The problem I'm having is that it works fine for the first few tests but any messages after that it just hangs for 5 minutes before giving a time-out message. When it's working it goes through without any delay. If I leave for say anther half an hour its back working again. I send a couple more test messages its all good, but and then it hangs again.

How can I troubleshoot this intermittent problem? My ISP is running PHP on an IIS server. It seems like a server issue.

Thanks
Stephen



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to