Jump to content

Archived

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

3s2ng

Mail Function

Recommended Posts

Hello Freaks,

I'm having problems using the mail funtion.

I want to send an html email to my user.

Here is my header and the mail code

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $admin_email\r\n";

        mail("$to",$subject,$str_message,$headers);

Is there something wrong on my code? When I run the above code It will send an email but the problem is the body of email look like this

[code]Content-type: text/html; charset=iso-8859-1

From: admin@yahoo.com

This is the body.
[/code]

And the from field is "unknown sender"

What is wrong?

Hope you can help me.

THanks
MARK

Share this post


Link to post
Share on other sites
Could you display the entire code? It could be your webmail interface/email program that causes the problem, try with multiple clients.

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.