Welcome Guest, Not a member yet? Register   Sign In
Mailing List - 3000+ emails
#1

[eluser]Carl_A[/eluser]
I need to send bulk emails (mailing list), but my issue is that I have more than 3000 users on my mailing list.

I've read through most of the 'bulk emailing' threads on the forum, and I saw ppl suggesting using BCC Batch mode and some suggesting 'Cron Jobs'

Whats the best way (and simplest to code) to do this?

P.s I dont know what a 'Cron Job/ Script is' , so if you're suggesting I use that, please let me know how to go about it.

As of now this is how im doing it, it works fine for about 100emails, but then takes too long to execute.
Code:
$this->email->from('[email protected]', 'mydomain.com');
        $this->email->to('[email protected]');
        $this->email->bcc($MAILLIST->get_list_send()); //gets an array of emails

        $this->email->subject('Newsletter');
        $this->email->message($email_msg); //my email body is saved in '$email_msg'

        if($this->email->send())
        {
           $output_msg='Email sent!';  //this is displayed later on using a view file
        }
#2

[eluser]Bart v B[/eluser]
You can try to edit the max_excution time to make it longer in youre php.ini

In youre php.ini:
max_execution_time = 30
to:
max_execution_time = 60

and reboot youre server.

Then the script is working for 1 minuet.

Or let the script sleep() for a few seconds, maybe that would help.

But it is better to do it with a cronjob. Only i never did it with CI so i can't help you with that at the moment.
#3

[eluser]rogierb[/eluser]
Hi,

you can use set_time_limit() to increase the execution time:
Code:
function send_bulk_email()

foreach($email_address as $my_email_addres)
{
  set_time_limit(2); //2 second max per emailaddress
  //send email
}
#4

[eluser]Bart v B[/eluser]
hmm.. did not thought aboute that.

But, from the manual:

Warning
This function has no effect when PHP is running in safe mode.
There is no workaround other than turning off safe mode or changing the time limit in the php.ini.


so, when you have save mode on then you must ask youre provider to turn it off, if you have a shared hosting.
#5

[eluser]Carl_A[/eluser]
I have my own dedicated server, so I can set everything.

But as Bart said, its better to do it with a cronjob.. Can someone tell me how to go about that?
#6

[eluser]n0xie[/eluser]
Take a look here




Theme © iAndrew 2016 - Forum software by © MyBB