Hi all I'm using the contact importer to let users send invitation to their contacts. I noticed that when they are sending email to more than 20-30 contacts, servers using lots of resources and, when I have 20-30 users doing that even web server end up crashing!!!
here is my send function! function send($email,$code,$message) { $this->Email->delivery = 'mail'; $activate_url= 'http://' . env('SERVER_NAME') . '/users/user_registration_invite/' .$code ; $this->set('url', $activate_url); $this->set('umessage',$message); $this->Session->write('$code',$activate_url); $loo = $this->Session->read('$code'); $name = $this->Session->read('Auth.User.first_name').' '.$this->Session->read('Auth.User.last_name'); $this->set('name',$name); $this->set('email',$this->Session->read('Auth.User.email')); $this->Email->to =$email; $this->Email->subject = "Invitation"; $this->Email->template = 'user_invitation_acceptance'; $this->Email->sendAs = 'html'; $this->Email->send(); } Did I do sth wrong? is there any way to optimize the process like sending the emails to the que? Thanks Sherry -- View this message in context: http://cakephp.1045679.n5.nabble.com/Cakephp-email-tp3226466p3226466.html Sent from the CakePHP mailing list archive at Nabble.com. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en