Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: mail::sendmail with an array of hashes

by eg (Friar)
on Feb 04, 2001 at 13:01 UTC ( [id://56294]=note: print w/replies, xml ) Need Help??


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 -

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://56294]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (None)
    As of 2024-04-25 03:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found