Setting FROM name and address in PHP Emails
Written by:
Will Kruss
on
17 May 2020 09:33 AM
|
|
If you are using PHPs mail function to send mail and would like to set not only the FROM email address, but also the name of the sender, please use the instructions below: By default, PHP will send e-mail from the account you are running the script from. Usually this is in the format of:
To ensure the From: address displays correctly to your users, please ensure you are sending the return-path, reply-to and from headers with the mail() function. Please be advised we do NOT support this code, it was obtained from the PHP documentation. The code shown here is an illustration of correct header configuration:
| |
|