Hi,
I’ve tried many things, but don’t have any clue what could be wrong with code. Special characters are not showing in Thunderbird on computer, but are showing in hotmail/gmail. Here’s the complete code I use:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="refresh" content="0;URL=thank-you-for-message.html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thank you for your message</title>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXX-X', 'domain.com');
ga('send', 'pageview');
</script>
</head>
<body>
<?php
iconv_set_encoding("internal_encoding", "utf-8");
$name = $_POST['nameSurname'];
$address = $_POST['address'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$how = $_POST['how'];
$subject = $_POST['subjectcontent'];
$message = $_POST['message'];
$to = 'some@email.com' . ', ';
$subject = "".$subjectcontent."";
$message = "THIS MESSAGE IS SENT FROM ONLINE CONTACT FORM\
"
."-------------------------------------------------------------------------------------------\
"
."\
"
."NAME:\
"
.$name."\
"
."\
"
."FULL ADDRESS:\
"
.$address."\
"
."\
"
."E-MAIL:\
"
.$email."\
"
."\
"
."PHONE:\
"
.$phone."\
"
."\
"
."YOU MAY CONTACT ME:\
"
.$how."\
"
."\
"
."MESSAGE:\
"
.$message. ;
$headers = "MIME-Version: 1.0" . "\\r\
";
$headers .= "Content-type:text/html;charset=utf-8" . "\\r\
";
$headers .= "Content-Transfer-Encoding: 8bit\
";
$headers = "From:" .$email. "\\r\
";
mail($to,$subject,$message,$headers);
?>
</body>
</html>
I’ve tried so many things that I don’t know anymore what I’ve tired. It’s really start getting very annoying, as I can’t find any solution for this.
Kind regards