GetDotted Domains

Viewing Thread:
"A quick PHP - mail() question"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 09/07/03 at 20:58
Regular
Posts: 787
I tried using this to send the mail as an HTML E-mail, but instead got all the HTML rather than the formatting.

All I did was write the HTML within the Content segment of the function.

Is it actually possible to have the mail sent as an HTML mail thought the mail() function, and if so, how can I tell the function to do this?

Thanks.
Thu 10/07/03 at 00:09
Regular
"Eff, you see, kay?"
Posts: 14,156
Indeed, the client needs to know it's in HTML first :)
Wed 09/07/03 at 21:07
Regular
"It goes so quickly"
Posts: 4,083
It's ok, I found it after a second browse through the PHP manual.

All I needed was to put the content type in:

"MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1"

... within the fourth paramater (where the headers for the mail are set).

For anyone else who's interested:

$To = "[email protected]";
$Subject = "test - HTML";

$Content = "";
$Content .= "";
$Content .= "Hello,
this is a test.";
$Content .= "";
$Content .= "";

$Headers = "FROM:[email protected]\r\n";
$Headers .= "MIME-Version: 1.0\r\n";
$Headers .= "Content-type: text/html; charset=iso-8859-1";

mail($To,$Subject,$Content,$Headers) or print "

Mail not sent.

";
?>
Wed 09/07/03 at 20:58
Regular
"It goes so quickly"
Posts: 4,083
I tried using this to send the mail as an HTML E-mail, but instead got all the HTML rather than the formatting.

All I did was write the HTML within the Content segment of the function.

Is it actually possible to have the mail sent as an HTML mail thought the mail() function, and if so, how can I tell the function to do this?

Thanks.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Just a quick note to say thanks for a very good service ... in fact excellent service..
I am very happy with your customer service and speed and quality of my broadband connection .. keep up the good work . and a good new year to all of you at freeola.
Matthew Bradley
Excellent support service!
I have always found the support staff to provide an excellent service on every occasion I've called.
Ben

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.