0

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

2
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by leakbali
0

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);	
}
0

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

1

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";
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.