X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FMailer%2FSMTP.pm;h=38ad2b75311b5172ec9d596be871bf1d002974b2;hb=3270e88361efc8ceff21314b489732229f0f98f7;hp=8012a04cd0a8391a871ac519bc55d71afdcec7f3;hpb=eb8e38d2a0a461b1b954a49ba2aeac81e0e85ec1;p=kivitendo-erp.git 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 {