I have a code to send mails, the code work fine and mail sent
but I get the mail from an address wird
the mail that I get the email from: [email protected]
my code:
$from = 'From: [email protected]';
if (!sendMail($_POST['mail'], $text['EMAIL_RECOVER_MSG_SUBJECT'], $text['EMAIL_RECOVER_MSG'], $from))
the send mail function:
function sendMail ($to, $subject, $msg, $from, $add = null) {
$from = array($from,
"Reply-To: [email protected]",
"X-Mailer: PHP/" . PHP_VERSION
);
$from = implode("\r\n", $headers);
return mail($to, $subject, $msg, $from);
}