Jump to content

Archived

This topic is now archived and is closed to further replies.

legohead6

mail with html

Recommended Posts

Hi, i took quiet a long break from php and know i am getting back but i have forgoten a thing or too..

what do you put for headers in the mail() function to make html work in the email?

Thanks,
Matt

Share this post


Link to post
Share on other sites
Check this


<?php
$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>


Cheers :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.