cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
You are here: Foswiki>Tasks Web>Item10919 (17 Dec 2011, GeorgeClark)Edit Attach

Item10919: Configure needs a function to test the email configuration

pencil
Priority: Enhancement
Current State: Closed
Released In: 1.1.4
Target Release: patch
Applies To: Engine
Component: Configure
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Email configuration errors are frequently a cause of problems for the new Foswiki installation.

Configure needs a way to send a test message to verify that email is functional.

  • Add a Pluggable module TESTEMAIL which inserts a "Test" button into a Test tab in the Email section of configure.
  • Add a new action TestEmail to configure which performs the following
    • Builds a simple message to and from the $Foswiki::cfg{WebMasterEmail}
    • Temporarily enables the SMTP debug flag
    • Send an email and capture STDERR to report to the user.

Sample output from the function:

Sending the following message using Net::SMTP::SSL
From: webmaster@example.com
To: webmaster@example.com
Subject: Test of Foswiki e-mail facility from configure
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2D594AE113AD25493C2C7246"

This is a multi-part message in MIME format.
--------------2D594AE113AD25493C2C7246
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

It Works!  Test message from Foswiki.


Please wait ... connecting to server ...
Results:
Net::SMTP::SSL>>> Net::SMTP::SSL(1.01)
Net::SMTP::SSL>>>   IO::Socket::SSL(1.35)
Net::SMTP::SSL>>>     IO::Socket::INET6(2.63)
Net::SMTP::SSL>>>       IO::Socket(1.31)
Net::SMTP::SSL>>>         IO::Handle(1.28)
Net::SMTP::SSL>>>           Exporter(5.64_01)
Net::SMTP::SSL>>>   Net::Cmd(2.29)
Net::SMTP::SSL=GLOB(0x88b3c00)<<< 220 mx.google.com ESMTP hw7sm4967192icc.15
Net::SMTP::SSL=GLOB(0x88b3c00)>>> EHLO localhost.localdomain

...
-- GeorgeClark - 27 Jun 2011

Oops - this was a duplicate of Item951.

-- GeorgeClark - 05 Jul 2011

Thanks for implementing this. I came to report it wink

-- MartinCleaver - 24 Aug 2011
 
Topic revision: r17 - 17 Dec 2011, GeorgeClark - This page was cached on 17 Jul 2018 - 19:48.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy