Re: cvs: php4 /ext/standard mail.c php_mail.h
| From: | sterling hughes | Date: | Tue, 06 Feb 2001 09:42:15 +0000 |
| Subject: | Re: cvs: php4 /ext/standard mail.c php_mail.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-3926@lists.php.net to get a copy of this message | ||
Derick Rethans wrote:
>
> On Mon, 5 Feb 2001, Sterling Hughes wrote:
>
> > > @- Added a new parameter to mail() which appends aditional command line
> > > @ parameters to the mail program. (Derick)
> >
> > This won't be portable, on windows it uses raw smtp code...
>
> I know this... it should probably be noted in the docs.
>
> > Are you sure we should be adding that option to the mail() command? If the
> > user really needs the advanced features provided by sendmail, they can
> > easily use popen() to achieve this...
>
> I think the -f option to sendmail is not advanced, and that because that
> without this -f option, all mail seems to come from nobody@localhost, this
> clutters up the logs, and no stats can be gegenerated about the usage of
> the scripts that send mail.
>
Set the additional headers (FROM:), it seems to work for me.
In perl, most people will open up a pipe to sendmail and set the from
header, its been working there to...
If this doesn't work, its a bug and should be fixed.
> The popen is possible too of course, but I think it's not that easy to do
> for almost not experienced users. To lower the bar for these users (and
> for making the transistion easier) I think this functionality is justified
> to be included in the CVS tree.
>
If you know about the -f sendmail option, then you pretty much know how
to use sendmail. Opening a pipe to an external program is pretty basic.
> For security, I thought about makeing the fifth parameter only be
> used for the -f option only, but this would be troublesome for other
> mailers probably. However, I really think that restricting it to the -f
> option is better.
Why have it then, just properly set the from: header and it *should*
work. I really don't like the current solution because its only
specific to one system, and can be done differently...
-Sterling