Welcome Guest, Not a member yet? Register   Sign In
How to send email for more than 1000 user............
#1

[eluser]MASS MASS[/eluser]
can i send email to more than 1000 user at a time ........


i will get email id from database.....


then in for loop ....... i will send maximum 50 email ........


after that ..........gives below error


Fatal error: Maximum execution time of 60 seconds exceeded in ......\system\codeigniter\Common.php on line 224



Any solution for this .............


thx in advance
#2

[eluser]Michael Wales[/eluser]
Use a Cron script to take care of this. Run it every X amount of seconds and have it email a batch of users, and update a field to identify whether they have been emailed or not.
#3

[eluser]ELRafael[/eluser]
be carefull to not be included in the blacklist! when you send a lot of mails, it is possible (self experience)
#4

[eluser]kucerar[/eluser]
[quote author="ELRafael" date="1191961213"]be carefull to not be included in the blacklist! when you send a lot of mails, it is possible (self experience)[/quote]

greylisting too. For even just validating email addresses. If one of your machines gets greylisted though you can move to a different one.
#5

[eluser]kucerar[/eluser]
[quote author="MASS MASS" date="1191953914"]can i send email to more than 1000 user at a time ........

Fatal error: Maximum execution time of 60 seconds exceeded in D:\xampp\htdocs\computeruser\system\codeigniter\Common.php on line 224



[/quote]

try command line, also maybe try fixing with php.ini:

Code:
max_execution_time=3000     ; Maximum execution time of each script, in seconds
#6

[eluser]MASS MASS[/eluser]
max_execution_time=3000 ; Maximum execution time of each script, in seconds


i tried this, but its not working..................



Please give me the proper solution for this........
#7

[eluser]Michael Wales[/eluser]
Your host is probably not letting you change execution time, which means you will have to use the multiple batches of emails I mentioned above.
#8

[eluser]MASS MASS[/eluser]
Can you give me some basic logic for it

..........senior member........
#9

[eluser]Michael Wales[/eluser]
Code:
$this->load->database();
$this->load->library('email');
$this->email->from('if_you_use_this_to_spam_me@i_will_kill_you.com');
$this->email->subject('I am serious');
$this->email->message('You will be a dead man.');

$query = $this->db->getwhere('addresses', array('mailsent'=>'N'), 50, 0);
if ($query->numrows() != 0) {
  foreach ($query->result() as $address) {
    $this->email->to($address->email);
    $this->email->send();
    $this->db->update('addresses', array('mailsent'=>'Y'), array('email'=>$email));
  }
}
#10

[eluser]MASS MASS[/eluser]
Ok its fine for only 50 users.....

ok,
I will explain completely

think .......today our site has 50 users.....i want to send e-news letter to every users(50)......from admin on one click(one function call)


tomorrow our site has 500 users.........i want to send e-news letter to every users(500)......from admin on one click(one function call)


then execution get problem............on one click




Theme © iAndrew 2016 - Forum software by © MyBB