Re: Sendmail Return-Path
| From: | Manuel Lemos | Date: | Tue, 27 Jul 2004 21:55:04 +0000 |
| Subject: | Re: Sendmail Return-Path | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192035@lists.php.net to get a copy of this message | ||
Hello,
On 07/27/2004 06:07 PM, Enda Nagle - Lists wrote:
I¹m using PHP¹s mail() function on several sites, but have difficulty sometimes with the mails being tagged as SPAM. I want to have the Return-Path set to the site admin, but can¹t see where to do this. I know that it can be done at server root level but I can¹t really do that as its a shared server. I do have my own php.ini file for my site, but can only see the following vars: mail function] ; For Win32 only. SMTP = localhost ; For Win32 only. sendmail_from = me@localhost.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = /usr/sbin/sendmail -t -i I¹m working off a Linux box, so presumably I can¹t use the sendmail_from variable? I also tried to set the following variable in the headers for the mail: $headers .= "X-Return-path: ME <user@domain.com>\r\n";Setting the return path is dependent of the delivery method. You may be able to set it using the mail function fifth argument, send via SMTP or call the sendmail program directly. You may want to try this class that simplifies everything by emulating the Return-Path header. Then, depending on the delivery method that is used, it will map to the appropriate action to set the return path address. You have the option to choose delivery via the mail() function, sendmail program, qmail program . Pick one delivery option that works well for you given your environment restrictions. http://www.phpclasses.org/mimemessage Feel free to mail me privately if you need further help, so you do not have to disclose in public private details of your environment. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html