I want to send emails to different users like the email I use the problem is that it takes a long time
foreach($users as $user){
$this->Email->smtpOptions = array(
'port' => '25',
'timeout' => '30',
'host' => 'smtp.topnet.tn',
);
Envoie Mail
$this->Email->delivery = 'smtp';
$this->Email->reset();
$this->Email->from = $from;
$this->Email->to = $To;
$this->Email->subject = $subject;
$this->set('id_user',$user_id);
$this->set('password',$pass);
$this->Email->template = 'activcompte';
$this->Email->sendAs = 'both';
$this->Email->send();
}