davidspe has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way of setting the smtp server in the Log::Dispatch::Email::MailSendmail module ?
  • Comment on setting smtp server in Log::Dispatch::Email::MailSendmail module

Replies are listed 'Best First'.
Re: setting smtp server in Log::Dispatch::Email::MailSendmail module
by zengargoyle (Deacon) on Apr 08, 2003 at 21:13 UTC

    not sure about the module by itself, but when it's used with Log::Log4perl there's a way....

    use Log::Log4perl; Log::Log4perl::init(\<<'_EOL_'); log4j.rootLogger = DEBUG, Email log4j.appender.Email = Log::Dispatch::Email::MailSendmail log4j.appender.Email.smtp = mail.mydom.com log4j.appender.Email.to = admin@mydom.com log4j.appender.Email.from = me@mydom.com log4j.appender.Email.buffered = 1 #log4j.appender.Email.subject = log4j.appender.Email.layout = Log::Log4perl::Layout::SimpleLayout _EOL_

    i would think you could just add it the same way you add the to/from/subject info to a Log::Dispatch::Email object.

Re: setting smtp server in Log::Dispatch::Email::MailSendmail module
by dug (Chaplain) on Apr 08, 2003 at 20:04 UTC
    The documentation seems to think so.

    update: Whups. Wrong module. That's what I get for being snide ;-)

    You can edit your Sendmail.pm file in the Mail::Sendmail distribution to specify a mail server.

    -- dug
      Thanks for the suggestion. It worked !!! :-)