AFP548 Changing the world one server at a time.

Sending mutliple emails in one PHP script fails

Home › Forums › OS X Server and Client Discussion › Mail › Sending mutliple emails in one PHP script fails

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #360698
    Anonymous
    Guest

    I’ve asked this on the lists.apple.com macos-x-server list, but had no response there.

    Xserve 10.3.7, Entropy PHP 4.3.10. If I call the following script:

    mail(’email@hidden’, ‘testA it is 12:00’, ‘Good day test A’);
    mail(’email@hidden’, ‘testB it is 12:00’, ‘Good day test B’);
    ?>

    I get some very interesting results. The first time I run the script everything worked as expected. I waited ten minutes, changed the time in the subject, and ran the script again. This time testA got the email, but not testB. I waited ten minutes and ran the script again, this time testA got the new message, testB got the new message, and testB got the message that was sent ten minutes ago but wasn’t actually sent until I ran the script again later! It seems like often messages get queued, but never sent out until the script runs again and pushes older messages through.

    This seems to be a sendmail or postfix problem, not a PHP problem. I see the following in my mail log when mail doesn’t go out:

    Jan 24 22:17:22 servername postfix/pipe[11216]: 6BDCA6B793: to=, orig_to=, relay=cyrus, delay=58, status=deferred (temporary failure. Command output: couldn’t connect to lmtpd: Connection refused_ 421 4.3.0 deliver: couldn’t connect to lmtpd_ )

    I’ve googled the error message, but have not found anything that helped me. I know VERY LITTLE about sendmail and postfix and do this as a hobby so the problem could be something very easy and trivial. Normal mail goes fine in and out of the server. What doesn’t make sense to me is why it works some (but not most) of the time.

    -Tim

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.