from name in email in php code example
Example 1: php mail function from name
<?php
$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: Jack Sparrow <[email protected]>' . PHP_EOL .
'Reply-To: Jack Sparrow <[email protected]>' . PHP_EOL .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
Example 2: read an email with php
//docs
https://www.php.net/manual/en/book.imap.php
https://garrettstjohn.com/articles/reading-email-php/