mail() php in message

From: Date: Sun, 12 Oct 2003 18:07:33 +0000
Subject: mail() php in message
Groups: php.general 
Request: Send a blank email to php-general+get-165914@lists.php.net to get a copy of this message
Hi, is there a way to create a mail (with the mail() function) that contains php in the message. Like: <?php $to = "user@domain.com"; $subject = "a subject"; $message = ???? I WANT TO PUT SOME PHP IN HERE TO CREATE A TABLE IN THE MESSAGE: $columnbooks = mysql_list_fields($dbname,tmp,$mysql_link); $sqlbooks = "select isbn,books.title, writer, publisher from tmp,books where tmp.user=books.user"; $resultbooks = mysql_db_query($dbname,$sqlbooks); ?> <table cellpadding="2" cellspacing="2" border="1" style="text-align: left; width: 100%;"> <?php while ($valuebooks = mysql_fetch_array($resultbooks))
{       print "<tr bgcolor=#ccf504>";
        for($i=0; $i< 4; $i++ )
        {
        $gebruikerbooks=$valuebooks[$i];
        print "<td> $gebruikerbooks </td>";
        }
        print "</tr>";
} mysql_free_result($resultbooks); THIS SHOULD BE THE END OF THE MESSAGE HERE I WILL DO THE MAILING mail($to,$subject,$message); ?>

« previous php.general (#165914) next »