cakephp 3 getOriginalSubject undefined index issue fixed

I am using cakephp 3.1 for development one of my portal. While configuring email Igot undefined index getOriginalSubject in DebugkitTransport.php. I searched for some time on net for solution but I did not find any solution. This function tries to get subject from email obejct. I think this is bug in cakephp 3.1.

My solution is as follows. I opened DebugkitTransport.php file and in send function I changed following line

/fixing issue of $email->getOriginalSubject undefined index
$headers['Subject'] = $email->subject();

Above line fixed my issue and I am able to send email now. I using smtp setting for sending email. I am using following code for one of my site called

$email = new Email();
try {
->from(['' => ''])
->viewVars(array('username' => $username, 'email' => $email))
->subject(' New registration.')
} catch (Exception $e) {

echo 'Exception : ', $e->getMessage(), "\n";


Add a Comment

Your email address will not be published. Required fields are marked *