Re: Mail class in pear
| From: | Chuck Hagenbuch | Date: | Tue, 03 Oct 2000 14:47:36 +0000 |
| Subject: | Re: Mail class in pear | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-324@lists.php.net to get a copy of this message | ||
Quoting Leo <leonard.west@afp.com>:
> I wrote a Mail component i'd like programmer to review, so that i could be integrated in
> Pear.
>
> It can be found with documentation at
> http://lwest.free.fr/doc/php/lib/Mail/?lang=en
A couple of things:
1. You don't need to call mail() once for each recipient.
2. Relying on php's mail() function means that you can't set the envelope
properly, which means that mailing lists that check the sender address in
the envelope won't accept mails from your script, among other things. Also,
errors may go to the wrong address.
3. There's no seperation between the code to create the message itself, and
the code to send the message. These can be entirely seperate, and _should_
be, to allow multiple sending backends (smtp, sendmail, mail(), etc) and
even frontends (one to specifically generate multipart/alternative, etc).
4. The code doesn't follow PEAR coding standards.
I've got a good set of mail code from my webmail application sitting around,
including smtp and sendmail code; I'll post it as soon as I have a chance to
clean things up and organize them well.
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
--
relevancy is the opiate of the masses