I want to send a styled email via heredoc, can that be done?

$message = <<<EOT
Title: This is a title of the Event.
Time: This the time of the Event.

Please show up on time.
EOT

mail('[EMAIL PROTECTED]' , 'An Event' , $message);

If so, how do you style it?

If not, how do you send stylized email?

The easiest way is this:

$message = <<<EOT
<span style="color: red">
Title: This is a title of the Event.
Time: This the time of the Event.
</span>

Please show up on time.
EOT

mail('[EMAIL PROTECTED]' , 'An Event' , $message, 'Content-Type:
text/html');

If you want to send multipart text/HTML emails, have a look at my
website for the HTMLMimeMail class which greatly simplifies this.

--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to