How can I send an email to 1000 people or more using PHP, without having to wait 10 hours while it works? Is it possible to set a cronjob from PHP?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
99.9% of this question is all about MTAs (mail transport agents – Sendmail, Postix, MS-Eschange etc) and nothing to do with PHP.
That’s not a lot – if its taking 10 hours then your system is specifically configured to prevent bulk emailing or your code is truly dreadful. You’ll get better throughput if you can put as many addresses as possible on the envelope. I would guess that if you’re sending messages to this many users you don’t want all the addresses to appear in the ‘to’ header? Which means adding bcc headers for 50 or so addresses at a time.
Do you control your MTA? Does it rely on a smart relay?
Do you mean create a cron job from PHP? Yes, that’s possible, but not a good idea so most admins will prevent it. Or do you mean you want to run a PHP script as a cron job? Yes – assuming that you have the CLI version of PHP available on the system where cron runs – or a dumb http client like wget / curl.
C.