Re: [PHP-DEV] Adding mail() Parameter to Set Return Path
Hartmut Holzgraefe [EMAIL PROTECTED] wrote... : Michael Sisolak wrote: The only downside I see to this is that the value would only work for the internal Win32 sendmail code and not the standard Unix calls to sendmail. A windows-only solution for a standard PHP function? Who uses PHP on Win32 for serious stuff anyway? ;) Those who very much are relying on Win32-only internals kind of do... -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Adding mail() Parameter to Set Return Path
Michael Sisolak wrote: The only downside I see to this is that the value would only work for the internal Win32 sendmail code and not the standard Unix calls to sendmail. A windows-only solution for a standard PHP function? Who uses PHP on Win32 for serious stuff anyway? ;) now serious: this is just another argument for dropping the sendmail kludge and come up with a working SMTP implementation for both platforms ... (we can still keep sendmail delegation as a less featured fallback if SMTP is not configured) -- Six Offene Systeme GmbH http://www.six.de/ i.A. Hartmut Holzgraefe Email: [EMAIL PROTECTED] Tel.: +49-711-99091-77 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Adding mail() Parameter to Set Return Path
At 22:16 30-10-2002, Michael Sisolak wrote: Several months ago the imap_sendmail.c routines were merged into the standard Win32 sendmail.c code. One of the results of this was that the TSendMail function gained a parameter to specifically set the mail header return path. The imap_mail() function can use this parameter, but the standard mail() function cannot (it is always set to NULL). Based on the number of comments on the mail() manual pages about issues that occur when the return path is always the sendmail_from ini value, it appears that it would be useful to add an additional optional parameter to mail() to set the return path. The only downside I see to this is that the value would only work for the internal Win32 sendmail code and not the standard Unix calls to sendmail. Any thoughts on this? Another downside, is that many SMTP servers by default ignores hardcoded Return-Path values - sendmail for instance, doesn't allow this on a socket, and only from a trusted user who is allowed to use -f on the command-line. If you choose to implement this, be warned that the MAIL FROM: command may override any attempts to set this. I think a parameter to set the MAIL FROM: user, will work much better. Last time I looked the 'From:' header is copied onto 'MAIL FROM:'. Separating those will have a more flexible and cross-platform solution, since you map that address to /usr/sbin/sendmail -f MAIL_FROM_USER on *nix. If you are going to work on this, could you please also look into bug #20056. Changes made to the win32 sendmail back in may IIRC involved fixes to address \n on less tolerant mailers. The problem is that MIME mail sent through the extra headers is now broken, since \r\n\r\n is truncated to \r\n. Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Adding mail() Parameter to Set Return Path
At 14:49 31-10-2002, Melvyn Sopacua wrote: I think a parameter to set the MAIL FROM: user, will work much better. Last time I looked the 'From:' header is copied onto 'MAIL FROM:'. Separating those will have a more flexible and cross-platform solution, since you map that address to /usr/sbin/sendmail -f MAIL_FROM_USER on *nix. By the way - just remembered that the functionality is already there, using the ini setting 'sendmail_from'. So you could take a shortcut and map Return-Path to ini_set('sendmail_from') and reset when leaving the mail function. Or just update docs :) With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Adding mail() Parameter to Set Return Path
At 11:29 31-10-2002, Hartmut Holzgraefe wrote: now serious: this is just another argument for dropping the sendmail kludge and come up with a working SMTP implementation for both platforms ... (we can still keep sendmail delegation as a less featured fallback if SMTP is not configured) -- Why should I need to open a network socket with all problems that may arrise with it, when I can call a binary? This goes for win32 also, by the way - win32 sendmail is out there, or blat and there are some webservers which come with a sendmail replacement tuned. sendmail_path isn't used on win32, not even when forced, so if any changes would apply, this would be the first IMO. -- There was talk of libesmtp, back in May. Markus and Derick tried to compile that on windows IIRC, and they had a blast :) Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Adding mail() Parameter to Set Return Path
Melvyn Sopacua wrote: At 11:29 31-10-2002, Hartmut Holzgraefe wrote: -- Why should I need to open a network socket with all problems that may arrise with it, when I can call a binary? why bother with additional subprocesses, incompatible command line interfaces, a command line interface that wasn't even really meant to be used for non-human interaction? the only advantage of using the sendmail binary on unix is that you usualy can rely on it being already configured besides that *all* the problems with mail() (one process per mail unless you bcc: identical copies, From: setting, no influence on SMTP envelope, ...) simply do not exist with SMTP based solutions (unless they are so badly coded as the win32 mail() implementation has been in the past ...) -- Six Offene Systeme GmbH http://www.six.de/ i.A. Hartmut Holzgraefe Email: [EMAIL PROTECTED] Tel.: +49-711-99091-77 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Adding mail() Parameter to Set Return Path
At 20:25 31-10-2002, Hartmut Holzgraefe wrote: Melvyn Sopacua wrote: At 11:29 31-10-2002, Hartmut Holzgraefe wrote: -- Why should I need to open a network socket with all problems that may arrise with it, when I can call a binary? why bother with additional subprocesses, incompatible command line interfaces, a command line interface that wasn't even really meant to be used for non-human interaction? the only advantage of using the sendmail binary on unix is that you usualy can rely on it being already configured Ok, good points. besides that *all* the problems with mail() (one process per mail unless you bcc: identical copies, From: setting, no influence on SMTP envelope, ...) simply do not exist with SMTP based solutions (unless they are so badly coded as the win32 mail() implementation has been in the past ...) Sure, but isn't this a convenience function? There's fsockopen and a number of plug-n-play SMTP packs out there using it. mail() should be '/bin/mail', You use it for simple things, not for bulkmailing and other advanced SMTP options. Wrapping (E)SMTP into a single mail() function opens a can of worms, you don't want to be dealing with. IMHO That should be ext/smtp's job, or Net::SMTP in Pear or whatever. Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Adding mail() Parameter to Set Return Path
Several months ago the imap_sendmail.c routines were merged into the standard Win32 sendmail.c code. One of the results of this was that the TSendMail function gained a parameter to specifically set the mail header return path. The imap_mail() function can use this parameter, but the standard mail() function cannot (it is always set to NULL). Based on the number of comments on the mail() manual pages about issues that occur when the return path is always the sendmail_from ini value, it appears that it would be useful to add an additional optional parameter to mail() to set the return path. The only downside I see to this is that the value would only work for the internal Win32 sendmail code and not the standard Unix calls to sendmail. Any thoughts on this? Michael Sisolak [EMAIL PROTECTED] __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php