Planning to write a simple mailing list php script. The mailing list would serve the following: a) Receive email address from new subscribers and store it in a database b) Send Emails to Subscribers on a weekly basis (pulling the email ids from database) c) Create a facility to unsubscribe Just wondering about how many emails the php mail() function can handle. I checked the default mailing list (powered by python) offered by my hosting company but for some reason I didnt like it. Do you guys have any other suggestions for this?
The mail function can only handle one email address. You would have to use a loop. I make the full script for you if you like, but at a price.
If you have any experience with PHP and MySQL, this really isn't a big deal. a) You need a HTML form where visitors can input their data (name and email address) and a script to store this data in the database. The script only has a query that saves escaped data to the database. b) Here you need a cronjob (you set this up in your cPanel) that runs a specific script once a week. That script pulls all the subscribers from the database and sends them emails in a loop. I suggest you something like PHPMailer class to send those emails (I am using my own wrapper for PHPMailer), but the basic mail() script will do just fine in the beginning. c) Every mail you send out should be a bit different and should include a link to some script on your website, like unsubscribe.php?subscriber=12345. The number here is ID of the subscriber in your database. When that script gets executed, you simply remove this subscriber from the database (or mark them as inactive). I hope this helps you a little ... don't give up.
Thanks for all your inputs. I would be manually sending messages once a week (through a web interface) so I dont need a cron job. However I remember reading in a book that mail function is not good for handling huge number of emails (say thousands). If that is true, what should be my alternative? Also I expect 3000 to 5000 email subscribers for my particular site.