summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2010-03-31 06:30:36 +0000
committerivan <ivan>2010-03-31 06:30:36 +0000
commiteb93d5bfe70f6ec709f98da93d69d04acccba607 (patch)
tree4f603b39e6a842d7e459f46117fdc7480fa474a5
parentdd2249efe0daa3fc3257029de84d212aa89a4ee9 (diff)
eliminate harmless "Use of uninitialized value $enc in string eq" warnings
-rw-r--r--FS/FS/Misc.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/FS/FS/Misc.pm b/FS/FS/Misc.pm
index 69954a862..71670f758 100644
--- a/FS/FS/Misc.pm
+++ b/FS/FS/Misc.pm
@@ -343,14 +343,14 @@ sub send_email {
$smtp_opt{'port'} = $port;
my $transport;
- if ( $enc eq 'starttls' ) {
+ if ( defined($enc) && $enc eq 'starttls' ) {
$smtp_opt{$_} = $conf->config("smtp-$_") for qw(username password);
$transport = Email::Sender::Transport::SMTP::TLS->new( %smtp_opt );
} else {
if ( $conf->exists('smtp-username') && $conf->exists('smtp-password') ) {
$smtp_opt{"sasl_$_"} = $conf->config("smtp-$_") for qw(username password);
}
- $smtp_opt{'ssl'} = 1 if $enc eq 'tls';
+ $smtp_opt{'ssl'} = 1 if defined($enc) && $enc eq 'tls';
$transport = Email::Sender::Transport::SMTP->new( %smtp_opt );
}