$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>
<meta charset="UTF-8">
<meta id="view" name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<h2>Last minute ACMI:</h2>
<table width="750" border="1" cellpadding="10">
    <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>
  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";
<p>thank you for your follow up <br>
    Let us know if you have any further questions.<br>
    best regards, <br>



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>
echo 123;

is going to output:

<?php echo 123; ?>

In an email