Personal I am making a code for sending email via phpmiler the problems this is in generating an html as the body of the email containing variables. Type
Tipo arquivo html.php
$variavel = "
<html>...
<body>...
$cmd = "SELECT *FROM cotacao where c.cod = '12015172607' ";
$produtos = mysql_query($cmd);
$total = mysql_num_rows($produtos);
while ($linha = mysql_fetch_array($produtos)) {
echo $id_produtos = $linha['id_produtos'];
</body>
</html>
";
And I have the phpmiler code that I get this $ variaval
include"html.php";// aonde esta a variavel
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = $assunto;
$mail->Body = $variavel; aqui recupero a variavel com o html
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
The problem is how to do a mysql SELECT within a variaval