Hi all,

I have this mail which works fine:

But how can I pass the html tags, as html tags so it shows bold in my inbox?

As it is now, i recieve the tags as normal letters..

This is what I have:

if(empty($error_msg)) {
// If validated -> Send email
$to = "MyEmail@Mail.Mail";
$subject = "Email Fra enkelt-webdesign.dk";
$message = $besked;

$headers .= "<b>Der er ny besked fra:</b>\n\n";
$headers .= "<b>Navn:</b> $navn\n";
$headers .= "<b>Email:</b> $email\n";
$headers .= "<b>Virksomhed:</b> $virksomhed";
$headers .= "<hr />";

mail($to,$subject,$message,$headers);	
}

Klemme

Hi all,

I have this mail which works fine:

But how can I pass the html tags, as html tags so it shows bold in my inbox?

As it is now, i recieve the tags as normal letters..

This is what I have:

if(empty($error_msg)) {
// If validated -> Send email
$to = "MyEmail@Mail.Mail";
$subject = "Email Fra enkelt-webdesign.dk";
$message = $besked;

$headers .= "<b>Der er ny besked fra:</b>\n\n";
$headers .= "<b>Navn:</b> $navn\n";
$headers .= "<b>Email:</b> $email\n";
$headers .= "<b>Virksomhed:</b> $virksomhed";
$headers .= "<hr />";

mail($to,$subject,$message,$headers);	
}

Klemme

Trying this code:

if(empty($error_msg)) {
// If validated -> Send email
$to = "MyEmail@Mail.Mail";
$subject = "Email Fra enkelt-webdesign.dk";
$message = $besked;

$headers .= "<b>Der er ny besked fra:</b>\n\n";
$headers .= "Content-type: text/html\r\n";
$headers .= "<b>Navn:</b> $navn\n";
$headers .= "<b>Email:</b> $email\n";
$headers .= "<b>Virksomhed:</b> $virksomhed";
$headers .= "<hr />";

mail($to,$subject,$message,$headers);	
}

Thank you very much :-)

Its works now..

Do you know how I set the Charset in the mail function too, so I dont get weird carachters?

like accept charset utf-8 or something like that?

Klemme

Thank you very much :-)

Its works now..

Do you know how I set the Charset in the mail function too, so I dont get weird carachters?

like accept charset utf-8 or something like that?

Klemme

Add

$headers .= "charset=utf-8";

Great thank you very much for helping out!!

Klemme

You are welcome..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.