ess14 Posted April 3, 2008 Share Posted April 3, 2008 I want to create a system where people sign up to a mailing list. heres the thing though, when they sign up they pick from a number of options that is then stored in a database with their email. I then want to send out emails to all these people relaying the options they picked. is php capable of going through a possible list of 10,000+ rows and individually mailing the user? is there some other way of doing it? do you know of a better system to use instead of php? Would i need my own mailer (as i know most hosts wont alow you to send bulk emails from their servers)? I imagine if i just did select on every user and mailed them from php my script could time out, or emails would be lost. any input, insight and constructive comments welcomed! Quote Link to comment Share on other sites More sharing options...
trq Posted April 3, 2008 Share Posted April 3, 2008 You could easlily use php but ideally, the actual email sending would be done via a cron job using php's cli. Quote Link to comment Share on other sites More sharing options...
ess14 Posted April 3, 2008 Author Share Posted April 3, 2008 cheers for the tip. i am looking into the CLI now. Could you please give me more information as to why the CLI is the way to go? And how would i use the CRON jobs? is that not just scheduling? Does anyone else have any insight? Quote Link to comment Share on other sites More sharing options...
trq Posted April 3, 2008 Share Posted April 3, 2008 please give me more information as to why the CLI is the way to go? Because it runs independently of the web server process and won't timeout. And yes, cron jobs are simply scheduling under Linux. Should be plenty of tutorials around the net. Quote Link to comment Share on other sites More sharing options...
ess14 Posted April 3, 2008 Author Share Posted April 3, 2008 thanks for your help, ive looked into it and im getting closer to where i want to be! Now, im asuming i will have to set my machine up on a static IP so i can get a proper DNS to send email from. I cant send bulk email through my ISP's SMTP and i cant send email from my localhosts dynamic IP address(gets blocked by mail servers). Im not sure if i want to go down this route though.... I guess i will have to find some sort of SMTP hosting for mailouts.... any other ideas? Quote Link to comment Share on other sites More sharing options...
trq Posted April 3, 2008 Share Posted April 3, 2008 You shouldn't need a static ip, take a look at the services offered by http://dyndns.org. Quote Link to comment Share on other sites More sharing options...
ess14 Posted April 3, 2008 Author Share Posted April 3, 2008 wow, thats awesome! you have been a wonderful help! i cant thank you enough! Quote Link to comment Share on other sites More sharing options...
ess14 Posted April 6, 2008 Author Share Posted April 6, 2008 Ive been doing more research into the topic and ive decided to go with SMTP relay hosting for emails. If i want to send 10,000 emails out, whats the best way of doing that with php? Ive come accross a couple of options for sending the actual mail from php, what do people think? any other suggestions? -- PEARs mail class with PEAR mail_queue -- php's fsockopen(); any pro's and cons? My main concerns are making sure all emails get sent, and that im not viewed as a spammer from mail servers! All contacts on the list are opt-in! Quote Link to comment Share on other sites More sharing options...
ess14 Posted April 9, 2008 Author Share Posted April 9, 2008 ive decided to go with PEARS mail functions (mail_queue) Another question though, how do i test send, say, 5000 emails? Just to make sure they get sent, and see what happens when some arent delivered etc? I have set up a local mail server and I can test that way, but Id really like to test in a WAN environment. If i send 5000 emails to my hotmail, will that have a negative effect on my SMTP host? will they be blacklisted as spam? or should i stick with my LAN testing, and just keep an eye on things when i go online? Quote Link to comment Share on other sites More sharing options...
keeB Posted April 10, 2008 Share Posted April 10, 2008 Set up a local smtp server which does nothing with the emails and test it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.