We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You must opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>NetpmProblem (01 Apr 2002, RandyKramer)
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 - 01 Apr 2002 - 15:28:33 - RandyKramer
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback