Re: PEAR on Win32
| From: | Chuck Hagenbuch | Date: | Mon, 28 Aug 2000 14:59:49 +0000 |
| Subject: | Re: PEAR on Win32 | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-224@lists.php.net to get a copy of this message | ||
Quoting Sterling Hughes <sterling@designmultimedia.com>:
> Another option if you want a common API why not name it Sender.php, then
> place it in Mail:
... but then your implementation objects aren't subclasses of the common api
(which is the best we can do, not having interfaces). It's just not clean...
It'd be like having DB_mysql on the same level as DB.
> Also I don't see the reason for any class besides Mail/SMTP for sending
> e-mail, most Mail servers (placing foot in mouth) are SMTP anyway right?
> Why interface with Sendmail? What other protocols are commonly used for
> sending e-mail (Perl, as far as I know, only supports Mail::Sendmail, which
> uses SMTP).
I think Perl has Mail::Mailer, which takes parameters to say what to use,
which is essentially what I'm aiming for. You'd never actually include (or
write) Mail_Mailer_SMTP; you'd say $mailer = Mail_Mailer::factory('SMTP');
and it would do the right thing.
We want to support other ways of sending mail because you don't always want
to speak smtp yourself. If the host you're trying to connect to is down,
then actually using a command line client - I think ssmtp is an example -
that can take the message, queue it, and then keep retrying, is a huge win.
Otherwise your php script would have to immediately bounce mail because of
routes being down, etc - mail that's normally just delayed and sent later.
> I'd say Message is a clearly defined subject and deserves a top level
> directory.
I can buy that, I think. I'm just not sure what goes under it. MIME is a
fairly large subject, and some of the MIME functions you'd use in composing
an email aren't specific to email.
Also, in this scheme, where would a class to post NNTP messages go?
Mail/Mailer is the message sending interface, and probably the best place
(Mail/Mailer/NNTP), but that's a little iffy...
ick :)
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
--
" ... I mean, who wouldn't look forward to waking up in the morning and
having a nice big bowl of frosted For-Next Loops ... " - Slashdot comment