mail() php in message

From: Onno Kuipers (onno_at_acido.net)
Date: 10/12/03


To: php-general@lists.php.net
Date: Sun, 12 Oct 2003 20:07:33 +0200

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);
?>



Relevant Pages

  • Re: massive email
    ... > list of emails and first names. ... I use this class for years that has been optimized for bulk delivery. ... You probably need to run the mailing script off the Web server, ... PHP Classes - Free ready to use OOP components written in PHP ...
    (comp.lang.php)
  • RH8, PHP APACHE SENDMAIL EMAIL problem
    ... MySQL APACHE and PHP. ... Mailing between user is done using ... $automessage = "AUTO RESPOND MESSAGE"; ...
    (linux.redhat)
  • Re: [PHP] Cron php & refresh
    ... mailing with php and rather use php to access the mta. ... Yeah, that is what maildoes - it calls sendmail. ... What the point of 50 mails now and then, let it all be decided by the mta. ...
    (php.general)
  • Re: [PHP] Add Reply-To to this list(s)
    ... > IMHO we'd be better off having a PHP Forum on php.net and scrub the Mailing ... > List altogether. ...
    (php.general)

Loading