Reputation: 20279
Is it possible to have special characters like ö, ä, ü, ß, ...
in the sender of a mail?
$sender = 'From: Mail with special characters öäüß <[email protected]>';
mail('[email protected]', '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $sender);
Upvotes: 2
Views: 1559
Reputation: 100175
You could do something like this:
$headers = "From: Info \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=utf-8\r\n";
$headers .="Content-Transfer-Encoding: 8bit";
$mes=htmlspecialchars_decode($mes,ENT_QUOTES);//optional
mail('[email protected]', "=?utf-8?B?".base64_encode($sub)."?=", $mes, $headers);
But yes, using some mailer class is better option: PHPMailer
Upvotes: 2