Jump to content

Archived

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

xyn

HTML E-mail headers/Settings

Recommended Posts

Hey,
This is a slightly silly question, but I actually
have forgotten how to set the headers to
make an email HTML format using mail();
Could someone give me a little tip / help.

Thank you!
-ASH

Share this post


Link to post
Share on other sites
[code]
<?php
$to = 'bob@barnyard.com';
$subject = 'Wakeup bob!';
$message = '<b>yo</b>, whassup?';
$headers = "From: server@barnyard.com\r\n" .
       'X-Mailer: PHP/' . phpversion() . "\r\n" .
       "MIME-Version: 1.0\r\n" .
       "Content-Type: text/html; charset=utf-8\r\n" .
       "Content-Transfer-Encoding: 8bit\r\n\r\n";

// Send
mail($to, $subject, $message, $headers);
<?
[/code]

Share this post


Link to post
Share on other sites
lol dunno how i forgotten :/.
thx mr :]

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

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.