From 01a72badb4e0d0b2ecb96c1e176f9f2d333f8aff Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Mon, 27 Jun 2022 21:36:47 +1200 Subject: [PATCH] Make the email col configurable, and die if we can't find it --- merge.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/merge.pl b/merge.pl index 65695af..b2f518b 100755 --- a/merge.pl +++ b/merge.pl @@ -203,6 +203,10 @@ sub merge_message { my $cc = $tmplData->{'cc'}; my $reply_to = $tmplData->{'reply_to'}; my $email_address = $cols->{'email'} || $cols->{'email_address'}; + if (! defined $email_address && defined $tmplData->{'email_col'}) { + $email_address = $cols->{$tmplData->{'email_col'}}; + } + die "Unable to find email_address" unless defined $email_address; if ($send) { # If we're sending email, then send it, optionally with a BCC. -- 2.30.2