On Thu, 7 Sep 2000, Andrew Dunstan wrote:

|Could someone please explain to me why everybody seems so intent on
|having a mod_perl handler fork in order to send mail? Why not just use
|the very common Net::SMTP package which just talks on an SMTP socket to
|whatever mailhost you have (localhost or other). There are other
|packages on CPAN which perhaps have more power, but still don't fork, if
|that's what you need. Every benchmark I've done (quite a few ;-) shows
|that this is far faster way of sending mail.

To answer your question, I have tried some times ago, with one such module
(not sure if it was this one) and as the documentation was lacking I had
no clear idea of what was going on and could'nt get it to work properly.

As far as benchmarks are concerned, I'm sending one mail after having
displayed the page, so it shoul'dnt matter much ...

|My understanding (correct me if I'm wrong) is that in general having a
|mod_perl handler fork is a Bad Thing (tm).

Dunno about this; never read anything against it.

|(and of course there is even less danger with funky email addresses with
|shell metacharacters that way, too)

I pay attention to that kind of issues; as a matter of fact, the command I
use is: open(OUTP,'|/path/qmail-inject -H') -- so no variable in the
shell, and print the recipient in the output.

|I recall with some fondness Randal's "useless use of cat" awards - maybe
|we need to create a "useless use of fork" award :-)

Reply via email to