I'm trying to send emails using PHP mail function.
This is my code:
$from = "mymail@example.com";
$replyto = "Encarnação";
$headers = 'Content-Type: text/html; charset=utf-8' . "\r\n";
$headers .= 'Content-Transfer-Encoding: base64' . "\r\n";
$headers .= 'From: ' . $from . "\r\n";
$headers .= 'Reply-To: '. $replyto . "\r\n";
$headers .= 'Bcc: ohtermail@example.com';
mail($to, $subject, $message, $headers);
The emails are sent, but how the sender is showing as:
mymail@example.com
And I want it as:
My Name
Is this possible? I'm reading the manual and the examples provided seem to work, but why isn't my code? My server is Linux.
I've also tried:
$from = "Encarnação <mymail@example.com>"
But the accentuated characters are looking really strange