Question
What is to change or to setup in order to send confirmation email ?
After registration of a new user, following page is displayed:
=========================
Powered by TWiki
Attention
Thank you for registering
* Your personal TWiki topic
MarKnol has been created
-
- (Suggestion
- How about uploading your picture to your topic?) * You are also listed in the TWikiUsers topic
Warning: Could not send confirmation email
ERROR: Can't send mail using Net::SMTP. 5.7.0 Must issue a STARTTLS command first. d13sm12991131fka.3
at c:\PROGRA~1\TWiki\twiki\lib/TWiki/Net.pm line 437 TWiki::Net::_sendEmailByNetSMTP('TWiki::Net=HASH(0x2290e2c)',
'Date: Mon, 21 Jul 2008 05:46:30 GMT\x{a}From: TWiki Administrator...')
called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/Net.pm line 316 TWiki::Net::__ANON__()
called at c:\PROGRA~1\TWiki\twiki\lib/CPAN/lib//Error.pm line 379 eval {...}
called at c:\PROGRA~1\TWiki\twiki\lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x22e679c)', 'HASH(0x23d982c)')
called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/Net.pm line 332 TWiki::Net::sendEmail('TWiki::Net=HASH(0x2290e2c)',
'From: TWiki Administrator <j-ph.knoepfel@sunrise.ch>\x{a}To: Mari...')
called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI/Register.pm line 972 TWiki::UI::Register::_emailRegistrationConfirmations('TWiki=HASH(0x178b3ec)',
'HASH(0x204d33c)')
called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI/Register.pm line 814 TWiki::UI::Register::complete('TWiki=HASH(0x178b3ec)')
called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI/Register.pm line 341 TWiki::UI::Register::registerAndNext('TWiki=HASH(0x178b3ec)')
called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI/Register.pm line 97 TWiki::UI::Register::register_cgi('TWiki=HASH(0x178b3ec)')
called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI.pm line 159 TWiki::UI::__ANON__()
called at c:\PROGRA~1\TWiki\twiki\lib/CPAN/lib//Error.pm line 379 eval {...}
called at c:\PROGRA~1\TWiki\twiki\lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x34a2c4)', 'HASH(0x204cebc)')
called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI.pm line 197 TWiki::UI::run('CODE(0x1780e64)')
called at C:/Program Files/TWiki/twiki/bin/register line 31
Too many failures sending mail
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
=========================
Environment
--
TWikiGuest - 21 Jul 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
>
What is to change or to setup in order to send confirmation email ?
In configure, set the value of
{SMTP}{MAILHOST}
Otherwise, check the suggestions in
CouldNotSendConfirmationMail.
--
SeanCMorgan - 21 Jul 2008
Thanks for your answer.
Before posting my question, {SMTP}{MAILHOST} was already configured with:
smtp.gmail.com:465
(like defined in my Outlook account)
Do you have an other idea to solve the problem ?
Best regards
Jean-Philippe Knoepfel
--
TWikiGuest - 22 Jul 2008
I believe that GMail will not accept mails from foreign domains. Your log shows that your sender's address is
j-ph.knoepfel@sunrise.ch.
Maybe it is worth trying to set either your GMail-address as administrator's address with GMail in
{SMTP}{MAILHOST} or the sunrise address with a corresponding smtp server.
--
SebastianKlus - 23 Jul 2008
Hi Sebastian,
Thanks for these hints, but it doesn't work.
Do you know somebody who have TWiki installed on windows and using email for registrations and notifications ?
Best regards
Jean-Philippe Knoepfel
--
TWikiGuest - 27 Jul 2008
>
Do you know somebody who have TWiki installed on windows and using email for registrations and notifications ?
Certainly. Me for one.
>
ERROR: Can't send mail using Net::SMTP.
Perhaps you are missing the
Net::SMTP module? See these messages with the same problem:
--
SeanCMorgan - 29 Jul 2008
Seems to be answered. Closing this question after more than 30 days of inactivity. Feel free to re-open if needed.
--
PeterThoeny - 02 Sep 2008
What are 30 days of inactivity when you have eight years of time?
I just stumbled about the very same problem and did some research. No, setting
{SMTP}{MAILHOST} is not the problem, neither is a missing
Net::SMTP which is in the Perl core (perhaps not on Red Hat, they also exclude
CGI.pm). The problem is, as indicated by the first line of the error report,
Must issue a STARTTLS command first. Some SMTP servers simply insist on that. TWiki doesn't do that, and can't be convinced by
configure to do it.
The good news: If you look at the
current documentation of Net::SMTP 
, you see that
Net::SMTP indeed has a
starttls which just needs to be
called. That's one line of code in
lib/TWiki/Net.pm, plus one line in
lib/TWiki.spec to allow to configure STARTTLS use for your TWiki, plus maybe one or two dozens of lines of documentation whether to activate STARTTLS. I
almost were about to write a feature request, but then, there are always gotchas.
Harmless, but needs to be checked by configure: Using STARTTLS that way needs
IO::Socket::SSL, a SSL capable drop-in replacement of
IO::Socket.
The bad news: All that does not work
before Perl 5.22 and hence not even in most "current" Linux distributions. The
starttls method is not available in
Net::SMTP as provided with Perl 5.20. Debian Jessie has 5.20, 5.22 is lingering in
unstable and
testing, other distributions seem to provide even older Perls.
So what I did to solve my problem was to install current versions of
Net::SMTP,
IO::Socket::SSL and
Socket from CPAN, patch TWiki as indicated above, and it works just fine (in Debian Jessie).
TWiki is still committed to support medieval Perl versions, so I guess we need to wait another eight years until this feature can be just added to the core... or to have yet another bunch of modules where CPAN knowledge is required (packaging them to TWiki is not an option since
Socket has architecture-dependent XS parts) ... or to define a TWiki "package" containing all it needs.
--
Harald Jörg - 2016-08-09