htmanning has asked for the wisdom of the Perl Monks concerning the following question:
I'm not sure how to solve this. I assumed it simply wouldn't send if the vars were empty. This is the error I'm getting 7x: sendmail.postfix: fatal: Recipient addresses must be specified on the command line or via the -t option:@email = ($email,$pscemail1,$pscemail2,$pscemail3,$pscemail4,$pscemail +5,$pscemail6,$pscemail7,$pscemail8); foreach $address (@email) { open (HTMLMAIL, "|$sendmail $address") || die "Can't o +pen $sendmail!\n"; print HTMLMAIL "From: $name <$adminemail>\n"; #print HTMLMAIL "Reply-to: $fromname <$fromemail>\n"; print HTMLMAIL "To: $address\n"; print HTMLMAIL "Subject: $subject\n"; print HTMLMAIL "Content-type: text/html\n"; Print HTMLMAIL "blah blah blah"; close (HTMLMAIL); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with loops
by Discipulus (Canon) on May 05, 2016 at 08:22 UTC | |
by htmanning (Friar) on May 05, 2016 at 08:43 UTC | |
|
Re: Help with loops
by hippo (Archbishop) on May 05, 2016 at 09:37 UTC | |
by htmanning (Friar) on May 06, 2016 at 04:47 UTC | |
by Anonymous Monk on May 06, 2016 at 06:35 UTC | |
|
Re: Help with loops
by Anonymous Monk on May 05, 2016 at 08:37 UTC | |
by htmanning (Friar) on May 05, 2016 at 08:42 UTC | |
by haukex (Archbishop) on May 05, 2016 at 09:04 UTC | |
by Anonymous Monk on May 05, 2016 at 08:48 UTC |