Results 1 to 9 of 9

Thread: sending out a mass mail from emails in a database

  1. #1

    Thread Starter
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294

    sending out a mass mail from emails in a database

    Hey all,

    I was wondering what is the best way to loop through a query result and send an email to each email address in the records (1 per record).

    I tried just looping through and using the mail() function, but for 1500 - 2000 emails it takes more than 10 mins, and that is not acceptable.

    any other ways of doing it?

    [this is not spam by the way. its for realtors to keep in touch with their clients]

    thanks,

  2. #2
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    Considering you posted this in the PHP forum I am assuming this is online and is probably dealing with a SLQ or MySQL database.

    The problem lies in that it takes 10 minutes b/c that is the fastest the server can spit out the emails, either due to bandwidth restrictions or the server just isnt fast enough for such a job due to lack of memory or physical resources.

    Honestly the only other way would be to send them all at once, but that will take just as long (if not longer and would reveal everyones email address to everyone who received the email).

    -Matt
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  3. #3
    I agree with Matt; that's how vBulletin does it too, which is why when John sends out a mass mail to everybody that the support site becomes slow for hours.

  4. #4
    scoutt
    Guest
    actually php wasn't designed to send mass emails. it is the timeout factor in php. the best way to do it is with perl

  5. #5

    Thread Starter
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    ok thanks guys, ill see what i can dig up in perl.

  6. #6
    New Member
    Join Date
    Dec 2002
    Location
    Madison Wisconsin
    Posts
    7
    In Perl you can use the Sendmail.pm module as long as your web server the script is running on has access to an SMTP service.

  7. #7
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Since this thread is 3 months old, I'm guess he either:

    1) Found a solution, or
    2) Gave up and has moved on.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  8. #8
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    yes, no need to dig it up again

  9. #9

    Thread Starter
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    I whole heartily agree with the views expressed by Hobo.

Posting Permissions

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



Click Here to Expand Forum to Full Width