dasein Posted April 28, 2009 Share Posted April 28, 2009 I need to email about 2 or 3 times a week to about 2,400 people. Unless you go with a VPS plan ($$$), most hosting companies I've gone to limit things to 250-750 per hour. Is there a way to write a php script that sends out, say, 500 each 60 minutes so the sender (not me) wouldn't have to hassle with doing that him/herself? These 2,400 are legitimate, no spam here, and it's only occasionally. Most emailing would be in the 10-25 range. I'd have to attach a clock to the script somehow, no? Thanks. Quote Link to comment Share on other sites More sharing options...
taith Posted April 28, 2009 Share Posted April 28, 2009 yes, you'd want to set a cron job to run a script every hour... Quote Link to comment Share on other sites More sharing options...
revraz Posted April 28, 2009 Share Posted April 28, 2009 Have you considered using a mailing list service instead? Quote Link to comment Share on other sites More sharing options...
dasein Posted April 28, 2009 Author Share Posted April 28, 2009 The user works through a php script to send the emails (something I'd like to keep). How would I integrate that on SUBMIT to either a cron script (I can pass variables into a cron? header, subject, message, etc...) or a mailing list? Mailing list services can be subscribed too? I use mailing lists on the host we have, I'm not understanding how that would work to avoid running up my counter on the site. Sorry...this is new territory for me. Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted April 28, 2009 Share Posted April 28, 2009 a cron job is just a service that executes a script/command at set intervals, ie. every hour, every 12 hours, etc. so, if you had the emails in a database, set the CRON job to execute a mail script populated with the emails from the database. Quote Link to comment Share on other sites More sharing options...
dasein Posted April 28, 2009 Author Share Posted April 28, 2009 So, in other words, when the user SUBMITs the php mail form, if the emails2send count is over 500, I send all the info to a toMail db, with a pair of start/stop counters in two of the fields. The cron job checks every hour, sends out x (say 500) copies (email addresses sequenced from another db), adjusting the counter when done for the next hour it will come in again? ...something like that? ...or is that too Rube Goldberg? Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted April 28, 2009 Share Posted April 28, 2009 more or less .. just come up with something to avoid duplicate recipients, ie. have a field update after every CRON job that states that user has been sent an email, ie. have (for arguments sake), 'emailSent' updated to '1' after an email has been sent .. do that for every person that has had an email sent to them. then, with the CRON job, have the script only execute against 'emailSent' that equals '0' .. '0' being the default given to a user after they submit their email for the mailing list or whatever. that's the idea anyways .. i may have rambled on a bit. Quote Link to comment Share on other sites More sharing options...
dasein Posted April 28, 2009 Author Share Posted April 28, 2009 No, I appreciate that...the extra field would be in the recipient db and make the counters unnecessary as the cron job will dish out x copies each time it kicks in...thanks! I have something to go play with now 8-) 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.