phphtmlhtml-emaillaminas-api-tools

PHTML / HTML (with style tags) embedding in Email body (zend Apigiliy Framework) in PHP


I am trying to add the Email body via phtml file inside of the Zend Apigiliy Framework mail service like this

$oMessage = $oMailService->createHtmlMessage(
    $eamil,
    $this->getConfig()["mail_subject_map"]['Project/V1/mail/userInvited'],
    'Project/V1/mail/inviteUserToProject',
    array(some variables to pass in phtml)
    ); 

with simple phtml PHP variables are displaying(giving output) the information but if I try to pass the HTML code with some of the inline styles then the PHP does not render variable inside of the HTML code I tried the following things in the HTML

<?= testvaidable ?>
<?PHP  testvaidable ?>
<?PHP echo "testvaidable" ?>

Any kind of suggestion will be highly appreciated

Thanks


Solution

  • I have solved the issue by checking the parameters that I was passing into the PHTM/HTML(parameters were different that was happening wrong )