thanks Jim - I change over to SwiftMailer and its working well.
"Jim Lucas" <lists@xxxxxxxxx> wrote in message
news:49AE0375.2040804@xxxxxxxxxxxx
Stephen Hutchison wrote:
I'll check with my ISP but if is that then it's a very low limit. I'm
finding it's only allowing two or three through before hanging.
Is there something i can put in my code so that it at least fails
gracefully? It's not a good look just hanging like that.
Thanks
Stephen
"Chris" <dmagick@xxxxxxxxx> wrote in message
news:49ADA6AB.5060508@xxxxxxxxxxxx
Stephen Hutchison wrote:
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>';
More likely a mail server issue rather than the mail function itself.
Do they have any restrictions on how often you can send email? (Some
hosts only let you send say 50 emails an hour).
Log everything you're trying to do in php (log when it works, when it
doesn't) and include a timestamp - then get your host to look at their
mail server logs for the failure times and see what shows up.
--
Postgresql & php tutorials
http://www.designmagick.com/
I would recommend getting away from using the mail() function altogether.
I would look into using something like phpmailer or SwiftMailer.
They are SMTP mail classes that let you build and email and send it
directly to your SMTP server.
Also allows you to log into the mail server with a valid email account and
send using that account.
That last part might get you around the X/minute email limit or whatever
else it might be.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php