Web Analytics Made Easy -
StatCounter performance of mail() - CodingForum

Announcement

Collapse
No announcement yet.

performance of mail()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • performance of mail()

    I'm working on a mail-feature that sends reminder mails to clients with unfinished tasks. Simple mail, text only, one receiver for each mail.
    This script is activated with a sceduled task or cron and looks up the records in a db and then composes a 'task-specific' message (an action was due before xxxxx . Please proces task xxxx etc) and then send the message + sets a flag after the email was sent. So i need to do it with PHP

    I've read in a usercomment at php.net that mail() is to slow because it opens a connection to the SMTP socket for each individual mail. But i nowhere find any real info on the performance of mail() --> from the few posts and comments that i could google up, it sounds like this is mainly an issue on windows OS.

    Anyone has first-hand experience with sending larger sets of emails (about 50 to 100) and then mainly : is mail() performant enough to send out 100 mails before the script times out ? Or do i need to cut the recordsets up and create a two-page loop until all records are processed? (Or do I need to find out the hard way ?)
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #2
    I've worked with mailing list software that uses the mail() command. For a few hundred mails I wouldn't worry about it at all. It might start to become an issue once you get into sending out 10,000+ emails but for a few hundred it should only take it a few seconds. Now this is on a Linux box so I cannot attest to how a Windows machine can handle the requests.
    Spookster
    CodingForum Supreme Overlord
    All Hail Spookster

    Comment


    • #3
      OK. Thanks.

      I don't expect to go above 200-300 mails in one go. It's not like a mass mailing or so --> a mail actually means they are not doing there job proparly.

      I just read about it and was kinda surprised because i never noticed any delays due to the mail processing I thought it might indeed create a problem when the volumes get bigger.
      So i'm just gonna write it out as a regular select-and-recordsetprocessing function and put a timer on it to monitor processingtime.

      Thanks again.
      Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

      Comment

      Working...
      X