if you | to sendmail, then you still fork. Mail::Sendmail, I
bet dime to dollar, forks and execs a process. The only way to avoid
forking is to open a socket and send the message via SMTP (or QMQP if
you want to pimp your system out with qmail). Unless you're on AIX or
solaris and performance is an issue, fork and get the job done w/
minimal headaches. -sc
On Sun, Apr 08, 2001 at 08:52:38AM +0200, Per Einar wrote:
> There is still one subject about subprocesses under mod_perl which is
> unclear to me: should I avoid pipes ot other programs or not?
>
> What I have understood is that I should avoid forking subprocesses.
>
> Now, here is my case: I want to send an e-mail to somebody. Should I open a
> pipe to sendmail (with open my $fh = gensym(), '|sendmail -t -oi'), or
> should I avoid this and use a Perl module like Mail::Sendmail.
>
> While I think Mail::Sendmail could provide what I need, I guess that
> sendmail is better at handling message queues etc, so it will be preferable
> to use that.
>
> What is the best choice in my case?
>
> Per Einar Ellefsen
> [EMAIL PROTECTED]
>
>
>
--
Sean Chittenden
PGP signature