Your recipients should be in @to which I would rename to @recipients and then:
for my $recipient(@recipients) { mail($recipient); } sub mail { my $recipient = shift; …; }
Add more args to your sub, like $from, $message, $transport etc.
«The Crux of the Biscuit is the Apostrophe»
In reply to Re: sending batch of emails by looping
by karlgoethebier
in thread sending batch of emails by looping
by frank1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |