note 12125 deleted from function.mail by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 23:14:08 +0000 |
| Subject: | note 12125 deleted from function.mail by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19901@lists.php.net to get a copy of this message | ||
If the "from" field is not behaving correctly, for example it keeps appending the name of
your domain at the end, make sure to specify an actual address. For example:
$sender="Sender Name";
mail($recipient,$subject,$body,"From: $sender\r\n");
will most likely result in a message
from "Sender.Name@yourdomain.com"
to solve this do this
$sender="Sender Name <sender@domain.net>";
mail($recipient,$subject,$body,"From: $sender\r\n");
this message will arrive from "Sender Name", with nothing else concatenated.