Tags:
create new tag
, view all tags

Bug: Mail Notify Bugs

I found a few bugs when trying to run mailnotify (TWikibeta20010803). First, on my system, mailnotify was failing whenever TWiki::Net tried to instantiate a Net::SMTP object. The problem was that my mailserver requires a HELO call before it will accept connections. I fixed this problem temporarily by hardcoding the "Hello" parameter in TWiki::Net::_sendEmailByNetSMTP --

    my $smtp = Net::SMTP->new( $mailhost, Hello=>"myhostname.com" );

The proper approach to fix this is probably to add a new configuration variable (e.g. MYHOSTNAME) and send that as the "Hello" parameter to Net::SMTP.

mailnotify was also failing when it tried to readTemplate(). I traced the problem to TWiki::getSkin. The call:

    my $skin = $cgiQuery->param('skin');

would fail because $cgiQuery does not exist (when called from the command line), and the program would die. This behavior is strange; you would think that the call would simply fail, and that $skin would be undefined. (This is for Perl v5.005_03.) Unfortunately, this is not what happens. To get around this, I checked to see if $cgiQuery was defined before making the call:

    my $skin;
    $skin = $cgiQuery->param('skin') if ($cgiQuery);

Both these changes made mailnotify happy.

Environment

TWiki version: Beta 20010803
TWiki plugins:  
Server OS: FreeBSD
Web server: Apache 1.3.12
Perl version: 5.005pl3
Client OS: Linux
Web Browser: Mozilla

-- EugeneKim - 27 Aug 2001

Fix record

Both changes have been done, TWikiAlphaRelease. Hello parameter can be specified by SMTPSENDERHOST variable. More in SendmailPerlSmtpSwitch.

-- PeterThoeny - 03 Dec 2001

Topic revision: r2 - 2001-12-04 - PeterThoeny
 
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.