Possible Duplicate:
How to change envelope from address using PHP mail?
My PHP code:
function send ( $from, $to, $subject, $message ) {
$header = array ();
$header [] = "MIME-Version: 1.0";
$header [] = "Content-type: text/html; charset=UTF-8";
$header [] = "From: =?UTF-8?B?" . base64_encode ( $from [ 'name' ] ) . "?= <" . $from [ 'mail' ] . ">";
return mail ( $to, "=?UTF-8?B?" . base64_encode ( $subject ) . "?=", $message, implode ( "\r\n", $header ) );
}
send ( array ( 'name' => 'oóöőuúüűÁÉÍ', 'mail' => 'from@mail.mail' ), 'to@mail.mail', 'oóöőuúüűÁÉÍ', 'oóöőuúüűÁÉÍ.' );
It's works, but... The from is not "oóöőuúüűÁÉÍ ", it's "from@mail.mail". The letter source is OK, coded from name and from mail. The view in mail.com account is fail, but the letter source is OK.