Re[4]: [PHP-WIN] Return-path in head of message?

From: Date: Mon, 20 Nov 2000 16:34:33 +0000
Subject: Re[4]: [PHP-WIN] Return-path in head of message?
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-3993@lists.php.net to get a copy of this message
Ketan: I found a way to modify the sendmail_from setting: 1. Create a subdirectory in your htdocs folder, lets say htdocs/mail 2. Change its configuration in httpd.conf: AllowOverride All <Directory "C:/Apache/htdocs/mail"> Options Indexes FollowSymLinks Multiviews AllowOverride All Order allow,deny Allow from all </Directory> 3. You will need two scripts: preparemail.php, that will create/overwrite the .htaccess file of the above directory with the following (replace sender@domain.com with the desire address): php_value sendmail_from sender@domain.com and after this, it will call the second script: sendmail.php, that calls the mail() function. Both scripts should be located in the htdocs/mail directory. I haven't actually made the scripts, I only tested manually changing the .htaccess file and looking at the results from phpinfo(), but I guess this will work. This ONLY works with PHP running as a module of Apache in Win32. Unix is different and CGI doesn't support modifing PHP values from .htaccess files. Hope this helps, Saludos, Pablo Vera _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Sunday, November 19, 2000, 4:47:27 PM, Ketan wrote: K> Yes, I tried it long time ago, but in this way, mail server write to its log file K> "Job has invalid or missig Reply-to: information K> Notification discarded - potential loop" K> ...and no message will arrive :-((( K> Even if the row "sendmail_from" is deleted (in php.ini) - PHP returns error (missing K> sendmail_from) K> and mail can't be send... :-( K> I don't know, what I can do. K> I cannot edit php.ini file directly from runnig script, because there IUSER has no write K> access... :-( K> Thanks for your suggestion. K> Ketan K> *********** Puvodni zprava *********** K> Dne 13.11.2000 v 19:12 hodin Pablo Vera napsal(a): >>Gonzalo, Ketan: >> >>If you leave the sendmail_setting blank, the Return-Path: will be >>displayed as <> and you can specify a From: in the headers parameter. >> >>In PHP.INI: >> >> [mail function] >> sendmail_from = ; for Win32 only >> >> >>Saludos, >>Pablo Vera >>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >> >>Monday, November 13, 2000, 5:01:56 PM, Gonzalo wrote: >> >>GV> This would be interesting, I would like to do it too. I have thought >>GV> that if you open php.ini from a php script, you can change it, but if >>GV> php is loaded as a module, it won't be read until the web server is >>GV> restarted, so you can't change "from" addresses for every mail. Is >>GV> that so? >> >>GV> Gonzalo. >> >>>> Hi All! >> >>>> Knows anybody how to change (one by one for each next mail) >>>> variable in php.ini file from my script? >> >>>> sendmail_from = ... ;for win32 only >> >>>> Everytime, I use function MAIL(), there in head of message is row >>>> "Return-path: ..." >>>> but I can not change it - every mail (even if the 4th parameter in mail() function >>>> is specified with "From: ...anothermail...\nReturn-path: >>>> ...anothermail...") has >>>> in header "Return-path: ..." (with the e-mail addres specified in >>>> php.ini). >> >>>> Please, help me!!!!!! >> >>>> Thanks >>>> Ketan

« previous php.windows (#3993) next »