in reply to Net::SMTP and Arrays
Is this what you meant?
if($usermail ne "") {
This is going to send email when $usermail is not blank. From the stuff inside the condition, it appears that you're sending to every address entered so far. So, for example:
Then again, you say that the mail is not sent at all, so perhaps I'm way off in the weeds here.
I'd suggest that you use Data::Dumper to show the contents of @addresses before the attempt at delivery.
use Data::Dumper; print Dumper \@addresses;
It's a good idea to show $usermail before you push it into the list too.
warn "\$usermail = '$usermail'\n";
Those two should give you a better idea of what's going on.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SMTP and Arrays
by raj8 (Sexton) on Feb 25, 2008 at 21:12 UTC |