in reply to mail::sendmail with an array of hashes
The problem is that you're calling sendmail with an hash ref, not a hash.
if ( sendmail $tank[$i] ){}
should be
if ( sendmail %{$tank[$i]} ){}
It looks like you're using Data::Dumper to debug. Good. Notice how there're braces (curly brackets) around the data when you dump $tank[$i]? That means it's a hash ref. Actually since you're not doing anything with the if, using unless would be cleaner.
print $Mail::Sendmail::error unless ( sendmail %{$tank[$i]} );
p.s. If you try to cut down the amount of code you post to a bare minimum that still exhibits your problem, you'll get much better response here. Plus, by isolating the problem, you give yourself a better chance of fixing it yourself!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: mail::sendmail with an array of hashes
by dystrophy (Monk) on Feb 05, 2001 at 06:50 UTC |