• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

When tracking down Item2696 in NatSkin, I found it necessary to modify the _generateEmails() function simply to understand why mails were not being sent out. As soon as I added the line:

$report .= "Mail error result: " . $error . "\n";

then I found a very informative error from the lower-level e-mail functions:

ERROR: Can't send mail, missing 'From:' at /var/www/wiki/lib/TWiki/Net.pm line 262.

At a minimum, _generateEmails() should indicate that one or more e-mails failed to go out. At present, it just reports the misleading "0 change notifications" as if no e-mails needed to be sent in the first place.

If all of the outgoing e-mails failed, I think _generateEmails() should notify _processChanges(), which would then NOT update the time-of-last-change. Based on my cursory understanding of this script (which could be wrong) the e-mails would be generated all over again on the next run. This logic protects against an unresponsive mail server or mangled mail template.

To really help an administrator, the _generateEmails() function should report to STDERR who it was trying to send to and what the sendEmail() error result was. It should generate this report even if the "-q" option has been specified. In a CRON environment, the error report would then be written into a system log file and would perhaps be e-mailed to the administrator.

Followed Scott's suggestions, which seem quite wise.


4.1.0 released


Summary MailerContrib: Mail sending errors are ignored and cause misleading output
ReportedBy TWiki:Main.ScottBarnes
Codebase 4.0.4
SVN Range

AppliesTo Extension
Component MailerContrib
Priority Normal
CurrentState Closed

Checkins 11534
TargetRelease minor
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-01-16 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback