SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mass Mailing in PHP

    Hello

    What is the best way to perform mass mailing in PHP?
    I don't want to loop at every email and send the message, yet not all users will receive exactly the same message...

    regards

  2. #2
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make an email queue system and then send a certain amount per minute.
    Have a good day.

  3. #3
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to send different messages you'll need to send different messages
    There's no way to make a single call to mail() but have different content to different recipients. It doesn't matter how much the body varies by.

    If your sending large volumes you probably need either to use sleep or cron jobs (or both) to throttle the sending. Especially if you're on a shared server.

    Swift Mailer is good, it might be of use to you.

  4. #4
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by cranial-bore View Post
    If you want to send different messages you'll need to send different messages
    There's no way to make a single call to mail() but have different content to different recipients. It doesn't matter how much the body varies by.

    If your sending large volumes you probably need either to use sleep or cron jobs (or both) to throttle the sending. Especially if you're on a shared server.

    Swift Mailer is good, it might be of use to you.
    Wow I didn't even think of sleep. Thats definitely a possibility if you don't have cron jobs.
    Have a good day.

  5. #5
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can setup a cron job for doing this.
    In the task you can setup the number of mail to send.

    If you can't setup cron. There is some web site who can give you this service by dowloading a page at regular time.

  6. #6
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make an email queue system and then send a certain amount per minute.
    Alright, but that requires crone jobs right?

    What if I don't want to use crone jobs?

  7. #7
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use a script which will download himself via curl.
    Normally recursion don't stop...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •