1. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    Q. How can I use a web-interface and PHP to send a simple text message to hundreds of subscribers WITHOUT the wait-time associated with the mail() function?

    More Details:
    I run a web site which has a few hundred subscribers. Their email addresses are being stored on a MySQL database. I can easily build a web-interface to send them all a simple text message using the mail() function. I could either loop through the table of email addresses and send them each a "To:" message using the mail() function, or I could list all their addresses in one long string and "Bcc:" the lot of them using just a single call to the mail() function.

    But as the list of names gets bigger and bigger, the time between hitting the 'Send Now' button and the processing actually finishing is getting longer and longer. I want to be able to give this functionality to a few others, therefore I'm looking for a more robust solution where they are not able to accidentally stop the mailing process once it's been initiated. Or perhaps it's possible to display a small progress bar on the screen (from 0% to 100%) as the emails get sent?

    So what I'm really looking for is a solution which sends a message out to all these recipients as some sort of background task after I hit the 'Send Now' button. I'm using a remote UNIX-based hosting service with an Apache web server.

    Any suggestions anyone? I'd prefer to write a solution myself (or be able to highly customise an open-source solution), so I guess I'm just looking for directions right now.

  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Central Florida, USA
    Rep Power
    PHP seems to have a function for just about everything. In this case I think the Ignore_User_Abort() function, coupled with a bit of other code, would probably do it. See http://www.php.net/manual/function.i...user-abort.php

Similar Threads

  1. Help with script
    By akastarlight in forum Perl Programming
    Replies: 1
    Last Post: February 6th, 2004, 07:55 AM
  2. Some recipients are being skipped when sending php mail
    By superwebman in forum PHP Development
    Replies: 4
    Last Post: January 10th, 2004, 05:23 PM
  3. How to send mail from VB to multiple users
    By josephg in forum Visual Basic Programming
    Replies: 23
    Last Post: October 29th, 2003, 01:53 AM
  4. Sending emails to multiple recipients?
    By adameve in forum HTML Programming
    Replies: 2
    Last Post: October 15th, 2003, 06:48 AM
  5. Replies: 3
    Last Post: October 5th, 2003, 03:10 PM

IMN logo majestic logo threadwatch logo seochat tools logo