Preventing an error when trying to send a message on mail-failure

git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@88 3873ddee-7413-0410-b6c4-c2c57c1ab35a
This commit is contained in:
wimpunk 2008-06-05 07:04:20 +00:00
parent ded79ea64e
commit 20bfbfbbef

View file

@ -1403,7 +1403,7 @@ sub logger {
sub sendmail { sub sendmail {
my $recipients = opt('mail'); my $recipients = opt('mail');
if (opt('mail-failure') && ($result ne 'OK' && $result != 0)) { if (opt('mail-failure') && ($result ne 'OK' && $result ne '0')) {
$recipients = opt('mail-failure'); $recipients = opt('mail-failure');
} }
if ($msgs && $recipients && $msgs ne $last_msgs) { if ($msgs && $recipients && $msgs ne $last_msgs) {