note 43427 added to function.mail
| From: | andy at NOSPAMthebmwz3 dot co dot uk | Date: | Mon, 21 Jun 2004 11:23:55 +0000 |
| Subject: | note 43427 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71431@lists.php.net to get a copy of this message | ||
An interesting problem highlighted this, when sending mail its a good idea if available to use
-fwebmaster@yourdomain.com
as a parameter to sendmail. I recently found a few anti-spam mail gateways were rejecting our mails,
because the from address appeared 'spoofed', yet using the -f option to sendmail solved
this problem.
So we now use:
mail("dest@ourdomain.com","Web site enquiry","$emailtext","From:
webmaster@ourdomain.com\r\nX-Mailer: server\r\nReply-To:
webmaster@ourdomain.com\r\n","-fwebmaster@ourdomain.com");
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43427
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43427&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43427&report=yes
Search -- http://master.php.net/manage/user-notes.php