Tags:
create new tag
, view all tags

Question

I'm getting an error emailed to me from cron about the WebNotify attempts Can't call method "mail" on an undefined value at ../lib/TWiki/Net.pm line 164.

Line 164 in Net.pm is: my $mailhost = &TWiki::Prefs::getPreferencesValue( "SMTPMAILHOST" ) || "mail";

I've got $mailProgram = "/usr/sbin/sendmail -t -oi -oeq"; set in TWiki.cfg (I don't know what the -t -oi -oeq does but that was there as a default.) Sendmail IS in /usr/sbin

I've been using sendmail succesfully for months. I'm using the Twikibeta

-- BrianJohnson - 30 Jul 2001

Answer

The latest Beta uses the Net::SMTP module by default in case it can be found. In case not, TWiki reverts back to sendmail. In your case it looks like the Net::SMTP module is installed on your system and TWiki tried to connect to the server machine called mail. Create a new SMTPMAILHOST variable in TWikiPreferences and set it to your SMTP mail host. In case you want to use sendmail instead, (for now) comment out the test for Net::SMTP in TWiki::Net:

    eval {
#       $useNetSmtp = require Net::SMTP;
    }

-- PeterThoeny - 31 Jul 2001

This problem is discussed on other pages including:

Some people have solved the problem by making a change around line of the 38 Sept2001 release in file Net.pm -- they changed $useNetSmtp= require Net::SMTP to $useNetSmtp=0.

Other people have solved the problem by commenting out the test for Net::SMTP in TWiki::Net around line 164 (probably line 187 in your case):

eval { # $useNetSmtp = require Net::SMTP; }

An attempt was made to solve this problem in the main release (IIRC) but it seems to keep cropping up.

-- RandyKramer - 01 Apr 2002

Topic revision: r3 - 2002-04-01 - RandyKramer
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.