I have a mailing of 30000 emails to sent.
Manish help me to implement a solution for which the main code is available below.
When I execute this code I have the following error message.
May you inform me how to solve it ?
//www.skills4all.net/manish/testmail.php //
Fatal error: Uncaught Error: Class ‘PHPMailer’ not found in /home/u903426621/domains/skills4all.net/public_html/manish/testmail.php:21 Stack trace: #0 {main} thrown in /home/u903426621/domains/skills4all.net/public_html/manish/testmail.php on line 21
2
Answers
I have a mailing of 30000 emails. I am looking for a free solution to be able to send email to all the contain in this mailing list.
Is it possible to code in PHP the solution ? Is it easier to do with another coding langages ?
Is there any free software which would give you this possibility ?
You need to get some SMTP email send out service for this.
If you have option for cron job then :
Add one column in your email database. say
email_sent
with typesmallint
It will add value as 0 by default.Now create a php script which will send email. In this script, select three (with limit clause) rows everytime with condition
where email_sent='0'
After sending email to email-ids in these three rows, updateemail_sent='0'
toemail_sent='1'
in that rows.Now set your cronjob to run per minute. So you can send 180 emails per hour. Generally shared hosting allows 200 / 250 emails per hour. (** of course as your table contains 30,000 rows, it will take around 6 days to send emails to all but as you needed free option, then some compromise is also needed )
Now second part, create another php script for cronjob to run every day / weekly etc. which will reset
email_sent='1'
toemail_sent='0'
in whole database table. So you can send new emails again with same php scripts.