You have set the addresses you will be sending to like this:
To => join(", ", @$em),
but nowhere have you set $em to anything, so the array is empty, so you have no recipients. A quick SSCCE to show how to pull these AoAs together:
#!/usr/bin/env perl use strict; use warnings; my $user1 = [ [ 'alpha@foo.com', 'beta@foo.dom' ], [ 'gamma@foo.com' ] + ]; my $user2 = [ [ 'delta@foo.com' ], [ 'epsilon@foo.dom', 'zeta@foo.com' + ] ]; my $TotalEmails = [ @$user1, @$user2 ]; my @to; for my $em ( @$TotalEmails ) { push @to, @$em; } my $tostring = join ',', @to; print "Full list of addrs: $tostring\n";
See how that works? You don't even really need the intermediate $TotalEmails but I've left it in for clarity. You can now use $tostring when sending your emails and they should all go out.
🦛
In reply to Re^9: Selecting DB
by hippo
in thread Selecting DB
by frank1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |