Re: Intermittent problem sending mail with PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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):
candidate@xxxxxxxxxxxxx

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: stephenh@xxxxxxxxxxxx Reply-To: stephenh@xxxxxxxxxxxx X-Mailer: PHP/ 5.1.1 Cc: stephenh@xxxxxxxxxxxx, takeaction@xxxxxxxxxxxx


thanks

""Stephen Hutchison"" <stephenh@xxxxxxxxxxxx> wrote in message news:BC.E4.19118.B059DA94@xxxxxxxxxxxxxxx
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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux