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 = [EMAIL PROTECTED]
; 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 <[EMAIL PROTECTED]>\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
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php