I'm trying to make a registration from which then gets send to my email. It works with english letters but when I try typing out something in bulgarian I get this:
NEW SUBSCRIPTION REQUEST.
Company Name: п п╬п╪п©п╟п╫п╦я▐. Country: п▒я┼п╩пЁп╟я─п╦я▐. City: п▒я┐я─пЁп╟я│. Address: я┐п╩п╦я├п╟. Company Reg NO: п п╬п╪п©п╟п╫п╦я▐123. VAT: п╫п╬п╪п╣я─ 213. Liable Person: п░п╥. Contact Person: п÷п╟п╨ п╟п╥. Phone: 1234567891. Email: test@test.test. Comments, questions:nqп╪a.
I have tried the whole content-type and charset UTF-8 but I can't get it to work. Here is my php code:
<?php
if (isset($_POST['submit'])){
$Company_Name = $_POST['Company_Name'];
$Country = $_POST['Country'];
$City = $_POST['City'];
$Address = $_POST['Address'];
$company_Reg_No = $_POST['company_Reg_No'];
$VAT = $_POST['VAT'];
$Liable_person = $_POST['Liable_person'];
$Contact_Person = $_POST['Contact_Person'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$questions = $_POST['questions'];
$mailTo = "myemail@...";
$subject ="Subscription request";
$header ="NEW SUBSCRIPTION REQUEST.\n\n";
$companyName ="Company Name: ". $Company_Name. ".\n";
$companyCountry ="Country: " .$Country.".\n";
$companyCity = "City: ".$City.".\n";
$companyAddress = "Address: " .$Address.".\n";
$companyNumber = "Company Reg NO: " .$company_Reg_No.".\n";
$companyVAT = "VAT: ".$VAT.".\n";
$companyLia = "Liable Person: ".$Liable_person.".\n";
$companyContact = "Contact Person: ".$Contact_Person.".\n";
$companyPhone = "Phone: ".$phone.".\n";
$companyEmail = "Email: ".$email.".\n";
$companyQuestion = "Comments, questions:".$questions.".\n";
$message = $header. $companyName.
$companyCountry. $companyCity. $companyAddress.
$companyNumber. $companyVAT. $companyLia. $companyContact.
$companyPhone. $companyEmail. $companyQuestion;
$mailHeaders='From:TestMail';
mail( $mailTo,
$subject,
$message,
$mailHeaders);
header("Location: success.html?mailsend");
}
?>
This file is being triggered by a post form with a submit button. You can see its fields at the top of the code, it's nothing special.