I have a mail () based form mailer on a website which I am now trying to set up to use iso-8859-2 or UTF-8 encoding to be able to display accented characters.
basic params are
$sendto = "webmaster@somemail.com";
$inquirytype = $_POST['inquirytype'];
$name = $_POST['name'];
$company = $_POST['company'];
$telephone = $_POST['telephone'];
$email = $_POST['email'];
$inquiry = $_POST['inquiry'];
$mail_header="Return-Path:webmaster@somemail.com\n
Content-Transfer-Encoding: 8bit\nContent-Type: text/html; charset=utf-8\r\n";
mail($sendto, "WebForm:", "Inquiry: $inquirytype\n\n$inquiry\nSender:
$name\n\n$company\nTelephone: $telephone", "From: $email\n$mail_header");
etc.
Now when Spamassasin which is setup on server gets it, it marks mail as SPAM:
0.3 NO_REAL_NAME From: does not include a real name
0.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
3.3 MSGID_FROM_MTA_SHORT Message-Id was added by a relay
1.7 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag
NO_REAL_NAME: It actually had a real name, but it was using special characters.
MIME_HTML_ONLY: I don't get this...
MSGID_FROM_MTA_SHORT: Neither I understand this...
HTML_MIME_NO_HTML_TAG: If I set to text/plain, I can't seem to specify the proper encoding so only garbage characters are displayed. Is there a way for me to set up text/plain and retain encoding and special characters?
(I am not sure if it is important to mention that page containing form is included into the main page containing iso-8859-2 charset - form page itself contains no encoding.)
What did I do wrong here? How should it be set up right?