This is my mailer's $header code.
I wanted to print the value of $em in from:<> but sadly it is not working.
i don't know PHP at expert level so kindly fix this problem, also I would like to know why this is happening.
$em="[email protected]";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: <$em>" . "\r\n";
echo $headers;
Current Output:
MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 From:
Expected Output:
MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 From: <[email protected]>