On 10/13/2003 06:13 AM, Onno Kuipers wrote:
thanx a lot! I think this will help. .............My server runs PHP and Mysql. Normaly I can put some php in my .php-files wich will create a html file for the clients. (you all know this of course).
My question now is: How can I put that html (created with PHP) in the message off the mail.
To not have to change your PHP code, you may capture the HTML you want to mail by enclosing your PHP code between a ob_start() and a ob_get_clean() commands, like this:
ob_start();
... your code here:
$message=ob_get_clean();
And then use the $message variable to compose an HTML message.
Sending an HTML message properly requires that you compose a message according to the MIME standards. Just try this class that makes it easy:
http://www.phpclasses.org/mimemessage
........ oops works only with PHP 4... and I ... euh.... PHP3..
Is there another method to do this before I even think of upgrading?
No, there is no support for capturing output data in PHP 3. The MIME message class works in PHP 3, but to capture the output in PHP 3 you need to change your code to assign a variable with the output data instead of using output buffering functions.
--
Regards, Manuel Lemos
Free ready to use OOP components written in PHP http://www.phpclasses.org/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php