diff options
-rw-r--r-- | Net/SMTP.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Net/SMTP.pm b/Net/SMTP.pm index 51e66d3..72ad541 100644 --- a/Net/SMTP.pm +++ b/Net/SMTP.pm @@ -188,10 +188,10 @@ sub auth { do { if ($client) { # $client mechanism failed, so we need to exclude this mechanism from list - my $failed_mech = $client->mechanism; - $self->debug_text ("Auth mechanism failed: $failed_mech") + my $failed_mechanism = $client->mechanism; + $self->debug_text ("Auth mechanism failed: $failed_mechanism") if $self->debug; - $mechanisms =~ s/(?:\s|^)$failed_mech(?:\s|$)//; + $mechanisms =~ s/\b\Q$failed_mechanism\E\b//; } $sasl->mechanism ($mechanisms); |