$body (phpmailer) error

Hi all,

strange thing I am using phpmailer to send some data retrieved from an Oracle.
The email is send no problem however the data is not shown, while on a standard
output it does show the data.

Appologies for the formatting as the html is parsed.

the $body variable consists of:

$body ='<html>
<head>
<meta charset="UTF-8">
<title></title>
<meta id="view" name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=9" />
</head>
<body>
<h2>Last minute ACMI:</h2>
<table width="750" border="1" cellpadding="10">
  <tr>
    <td width="150"><strong>DOF</strong></td>
    <td width="100"><strong>Flt nr:</strong></td>
    <td width="100"><strong>DEP:</strong></td>
    <td width="100"><strong>STD:</strong></td>
    <td width="100"><strong>STA:</strong></td>
    <td width="100"><strong>ARR:</strong></td>
  </tr>
  <?php 
  while ($row = oci_fetch_array($acmiout, OCI_ASSOC+OCI_RETURN_NULLS)) {
    echo "<tr>\n";
    foreach ($row as $item) {
        echo "    <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : "&nbsp;") . "</td>\n";
    }
    echo "</tr>\n";
};
?>
</table>
<br>
<p>thank you for your follow up <br>
    Let us know if you have any further questions.<br>
    <br>
    best regards, <br>

</p>
</body>
</html>';

Well, you show a messed up bit of code, but, no PHPmailer code.
Please show us the how you set up your mailer library arguments, then we might be able to help…

I see issues with how you create the body. You have php embedded into the email.

The better idea is to create an email template and replace what you need and then send it. But,

$var = '<html>
<?php
echo 123;
?>
</html>';

is going to output:

<?php echo 123; ?>

In an email

Sponsor our Newsletter | Privacy Policy | Terms of Service