You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Richard Clarke <ri...@likewhoa.com> on 2002/07/20 15:27:37 UTC

Mail::Sender & modperl.

List,
    Have any of you had any problems using Mail::Sender from within 
mod_perl. My script seems to just sit there waiting for $sender->Open to 
do anything. I will email the author also but imagined he *might* not be 
familiar with mod_perl so won't be able to offer any suggestions. 
Anyone? I looked through the archives but saw no reference to a problem 
like this. Some people indicated much success with Mail::Sender (not so 
for me however!).

Second, the recommended solution for sending mails is to instead put 
them on a queue for an external daemon to handle. My question is, is 
there a standard implementation people use when doing this. Is the KISS 
theory invoked and the outoing mail simply written to some plain text 
spool file or do people use something more involved like writing the 
to,cc,from,subject,body test to a database and storing any temporary 
files (attachment) in a directory for later encoding?

Ric

p.s. here is an excerpt from my apache log indicating precisely what happens

 >> 220 mail.likewhoa.com ESMTP Postfix
421 Error: timeout exceeded
<< ehlo localhost
<< mail from: <ri...@domain.com>
<< rcpt to: <ri...@email.com>
<< data
<< To: ric@email.com
<< From: ric@domain.com
<< X-Mailer: Perl script "null"
<<      using Mail::Sender 0.7.14.1 by Jenda Krynicky
<<      running on localhost (127.0.0.1)
<<      under account "root"
<< Date: Sat, 20 Jul 2002 13:18:12 -0000
<< Message-ID: <20...@domain.com>
<< Subject:  msg msg msg
<<
close sender
<<
<< .
<< quit
done
The request took 305.710375070572 seconds


Re: Mail::Sender & modperl.

Posted by Aaron Johnson <so...@gina.net>.
On Sat, 2002-07-20 at 09:27, Richard Clarke wrote:
> List,
>     Have any of you had any problems using Mail::Sender from within 
> mod_perl. My script seems to just sit there waiting for $sender->Open to 
> do anything. I will email the author also but imagined he *might* not be 
> familiar with mod_perl so won't be able to offer any suggestions. 
> Anyone? I looked through the archives but saw no reference to a problem 
> like this. Some people indicated much success with Mail::Sender (not so 
> for me however!).
> 
> Second, the recommended solution for sending mails is to instead put 
> them on a queue for an external daemon to handle. My question is, is 
> there a standard implementation people use when doing this. Is the KISS 
> theory invoked and the outoing mail simply written to some plain text 
> spool file or do people use something more involved like writing the 
> to,cc,from,subject,body test to a database and storing any temporary 
> files (attachment) in a directory for later encoding?

I prefer to use [0]MIME::Lite.  Writing to the spool can, depending on
email server configuration provide better performance, but at the loss
of portability.  For even greater portability when using MIME::Lite you
can use Net::SMTP for sending instead of the default 'sendmail'.

Aaron Johnson

0. http://search.cpan.org/doc/ERYQ/MIME-Lite-2.117/lib/MIME/Lite.pm

> 
> Ric
> 
> p.s. here is an excerpt from my apache log indicating precisely what happens
> 
>  >> 220 mail.likewhoa.com ESMTP Postfix
> 421 Error: timeout exceeded
> << ehlo localhost
> << mail from: <ri...@domain.com>
> << rcpt to: <ri...@email.com>
> << data
> << To: ric@email.com
> << From: ric@domain.com
> << X-Mailer: Perl script "null"
> <<      using Mail::Sender 0.7.14.1 by Jenda Krynicky
> <<      running on localhost (127.0.0.1)
> <<      under account "root"
> << Date: Sat, 20 Jul 2002 13:18:12 -0000
> << Message-ID: <20...@domain.com>
> << Subject:  msg msg msg
> <<
> close sender
> <<
> << .
> << quit
> done
> The request took 305.710375070572 seconds
> 
>