php电子邮件域名

mail("xxxxx@xxxxxx.com",
    'This is the subject!',
    '<div style="background:black;color:green;width:100%;height:1000px;">Email email message message HEy</div>',
    "Content-type: text/html; charset=iso-8859-1; From: 1234abc"
);

When I send this to my mail, it shows as a black background and green text. But the From header doesn't work. It just shows as apache apache@ns209646.ip-188-165-193.eu where 188.165.193.158 is my servers ip address.

enter image description here

Multiple extra headers should be separated with a CRLF ( ).

$headers = 'From: 1234abc <webmaster@example.com>' . "
" .
'Reply-To: webmaster@example.com' . "
";

However i suggest using an automated mailer I use http://swiftmailer.org/ and got rid of a lot of frustration because of headers in mails, also mails look better from spam assassin’s pov

Multiple extra headers should be separated with a CRLF ( ).

source

... "Content-type: text/html; charset=iso-8859-1
From: 1234abc" ...