From 5527271d5b92f6472b855b547de7e353b1fc9236 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 8 Jul 2013 10:09:53 +0200 Subject: [PATCH] =?utf8?q?SMTP-Mailer:=20Login-Konfigurationseinstellung?= =?utf8?q?=20hei=C3=9Ft=20"login",=20nicht=20"user"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Die kivitendo.conf führt "login" als Namen für die Einstellung auf. Für Rückwärtskompatibilität aber beide Varianten unterstützen. --- SL/Mailer/SMTP.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SL/Mailer/SMTP.pm b/SL/Mailer/SMTP.pm index 8012a04cd..38ad2b753 100644 --- a/SL/Mailer/SMTP.pm +++ b/SL/Mailer/SMTP.pm @@ -31,9 +31,13 @@ sub init { $self->{smtp}->starttls(SSL_verify_mode => 0) || die if $self->{security} eq 'tls'; - return 1 unless $cfg->{login}; + # Backwards compatibility: older Versions used 'user' instead of the + # intended 'login'. Support both. + my $login = $cfg->{login} || $cfg->{user}; - $self->{smtp}->auth($cfg->{user}, $cfg->{password}) or die; + return 1 unless $login; + + $self->{smtp}->auth($login, $cfg->{password}) or die; } sub start_mail { -- 2.20.1