CakePHP 2.4 CakeEmail ignores from() configuration

24 views Asked by At

I need specify distinct senders in each sendend email with cake, but my tests are failing:

$email = new CakeEmail('password');                                                     
$email
    ->to('[email protected]')
    ->from('[email protected]', 'Sender')
    ->replyTo('[email protected]')
    ->subject('Subject')
    ->send();

But the sendend email gets other from email. It changes the sender's name to 'Sender', or any else that I give to from() function, but ignores the email address, using the general config for all emails.

Some of my emails need other from dynamic addresses. It is a CakePHP 2.4 site.

0

There are 0 answers