I want to set parent to email that was sent from afterSave Hook but it seems not working for some reasons.
$email->set(array(
'to' => $emailAddress,
'from' => '......@....',
'name' => 'CREATED ORDER No. '. $temp->get('uID'),
'body' => 'body',
'parentId' => $temp->get('id'),
'parentType' => $temp->getEntityType(),
'isHtml' => true
));
$params = array (
'fromName' => 'ORDERING SYSTEM'
);
$this->getMailSender()->send($email, $params);
Everything works except email comes with no parent.
$email->set(array(
'to' => $emailAddress,
'from' => '......@....',
'name' => 'CREATED ORDER No. '. $temp->get('uID'),
'body' => 'body',
'parentId' => $temp->get('id'),
'parentType' => $temp->getEntityType(),
'isHtml' => true
));
$params = array (
'fromName' => 'ORDERING SYSTEM'
);
$this->getMailSender()->send($email, $params);
Everything works except email comes with no parent.
Comment