0

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

$email = new CakeEmail('password');                                                     
$email
    ->to('destination@email.com')
    ->from('new@email.com', 'Sender')
    ->replyTo('new@email.com')
    ->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.

msolla
  • 306
  • 1
  • 3
  • 16
  • Are you using Mail or Smtp transport? Does your PHP configuration maybe have the `sendmail_from` setting overriding this? – Greg Schmidt Feb 08 '23 at 22:12
  • I use SMTP transport. I need check sendmail_from with hosting, y have no acces to this. – msolla Feb 09 '23 at 17:44

0 Answers0