Hi,
While sending email, i am getting an error. Here is my code:
use Cake\Mailer\Email;
$email = new Email(‘default’);
$email->setFrom([‘test@example.com’ => ‘Test Cake Mail’])
->setTo(‘test2@example.com’)
->setSubject(‘Test Mail’)
->send(‘Test mail from CakePhp, please checkout.’);
$email object is created as i have debugged but its methods are said undefined.
I also need to debug the mail at local system rather than i send mail to recipients.
Please give some suggestions to debug mail and send properly.
Regards.