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]} );

See perldata and perlsyn.

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
    Thanks for the reply. (Boy do I feel sheepish) I was going to post just the bit I was having problems with, but I decided to include it all and ask for input...

    I really appreciate all the monks who took the time to read the code. Thank you for all your input on things like the mime header, Mail::Sendmail Bcc:, $", local and more.

    - dystrophy -