The above answer is correct. You need the \r\n at at the end of the "From" and "Reply-To" lines. AS WELL as at the end of ALL the other header lines.
According to the SMTP RFC (section "2.3.8. Lines")
Lines consist of zero or more data characters terminated by the
sequence ASCII character "CR" (hex value 0D) followed immediately by
ASCII character "LF" (hex value 0A). This termination sequence is
denoted as in this document. Conforming implementations MUST
NOT recognize or generate any other character or character sequence
as a line terminator. Limits MAY be imposed on line lengths by
servers (see Section 4).
In addition, the appearance of "bare" "CR" or "LF" characters in text
(i.e., either without the other) has a long history of causing
problems in mail implementations and applications that use the mail
system as a tool. SMTP client implementations MUST NOT transmit
these characters except when they are intended as line terminators
and then MUST, as indicated above, transmit them only as a
sequence.
So your header line of:
$headers="Mime-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: quoted-printable\nFrom: Metaldemos <[email protected]>\nReply-To: Metaldemos <[email protected]>\nReturn-Path: Metaldemos <[email protected]>\n";
is invalid, HTTP or SMTP headers MUST always end with \r\n not just a \n or \r
The correct line would be
$headers="Mime-Version: 1.0\r\n";
$headers.="Content-Type: text/plain; charset=UTF-8\n";
$headers.="Content-Transfer-Encoding: quoted-printable\n";
$headers.="From: Metaldemos <[email protected]>\n";
$headers.="Reply-To: Metaldemos <[email protected]>\n";
$headers.="Return-Path: Metaldemos <[email protected]>\n";
You CAN put it all in one long line that's fine, I just split it up to make it clearer.
The reason it didn't work before is because you only changed FROM and REPLY-TO you have to change all of them.