+ fix option smtp

This commit is contained in:
garnier-quentin 2016-04-23 20:17:13 +02:00
parent aacbb8c3cb
commit 23efe69fc3
1 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ sub read_files {
sub send_email {
my ($self, %options) = @_;
#######
# Check SMTP options
return if (!((defined($self->{option_results}->{email_warning}) && $self->{option_results}->{email_warning} ne '')
@ -154,7 +154,7 @@ sub send_email {
if (defined($self->{option_results}->{email_smtp_username}) && defined($self->{option_results}->{email_smtp_password})) {
$smtp_options{-pass} = $self->{option_results}->{email_smtp_password};
}
foreach my $option (@{$self->{option_results}->{smtp_options}}) {
foreach my $option (@{$self->{option_results}->{email_smtp_options}}) {
next if ($option !~ /^(.+?)=(.+)$/);
$smtp_options{-$1} = $2;
}