From d2b1a4dfa6c9394634338bb73474b7ea4c49ce48 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 19 Dec 2024 19:33:27 -0500 Subject: [PATCH] fixup! add mail-from option move variable declaration closer to usage --- ddclient.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index 1043dce..ebd0e71 100755 --- a/ddclient.in +++ b/ddclient.in @@ -2401,12 +2401,12 @@ sub logger { } sub sendmail { my $recipients = opt('mail'); - my $sender = opt('mail-from') // ''; if (opt('mail-failure') && ($result ne 'OK' && $result ne '0')) { $recipients = opt('mail-failure'); } if ($emailbody && $recipients && $emailbody ne $last_emailbody) { + my $sender = opt('mail-from') // ''; pipecmd("sendmail -oi $recipients", "To: $recipients", $sender ne '' ? ("From: $sender") : (),