in reply to using the Mailer / sendmail perl module...

Maybe Mail::Mailer isn't the best choice. Popular choices include MIME::Lite, which can use either sendmail or Net::SMTP. If you don't want to do any work Net::SMTP::OneLiner might help (disclosure: I wrote that).

Also, I don't see a line 93 in your sample code... Could you give me a hint on that? What if it doesn't even relate to Mail::Mailer?

-Paul

  • Comment on Re: using the Mailer / sendmail perl module...

Replies are listed 'Best First'.
Re^2: using the Mailer / sendmail perl module...
by Anonymous Monk on Oct 08, 2007 at 14:38 UTC
    apologies I forgot to mark it out.... line 93 is
    $mailer->(To => $admin_email, Subject => 'Mascot db_update errors') or die "Can't +open: $!\n";
    I can't see any issues with that line however. I originally thought it required a  $mailer -> open ({args}) but according to the module docs apparently not when I fell down on open not being recognised. I'll take a look at the smtp oneliner though see if it will fit the bill, thanks Paul.

      I should have been able to see it anyway then.

      my $lambda = sub { print "lol!\n" }; $lambda->(); # will work my $mailer = Object::Name->new(); $mailer->(); # will not work

      I think you need to call a method name there ($mailer->send() for example), rather than invoking the blessed reference as a code reference -- which clearly doesn't work.

      -Paul