Re: mail() php in message
| From: | Manuel Lemos | Date: | Mon, 13 Oct 2003 17:40:55 +0000 |
| Subject: | Re: mail() php in message | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166005@lists.php.net to get a copy of this message | ||
Hello,
On 10/13/2003 06:13 AM, Onno Kuipers wrote:
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/thanx a lot! I think this will help. ............. ........ oops works only with PHP 4... and I ... euh.... PHP3.. Is there another method to do this before I even think of upgrading?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