kosta has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to call it like this from my scripts:sub sendmail { my $param = shift; print $param->{'to'}; #my $to=$param->{'to'}; #print 'toto je 2 : '. $to; my $email= MIME::Lite->new( From=>"$param->{'from'}", To=>"$param->{'to'}", Subject=>"$param->{'subject'}", Data=>"$param->{'data'}" ); $email->send; }
What am I missing - the hash doesn't get passed and my $param->{'something'} are just empty strings.... I followed this but apparently it doesnt work... thanks$mail->sendmail({to=>'koszta@seznam.cz', from=>'admin@server.com', dat +a=>'hi from server', subject=>'msg body'});
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing a hash to module function
by wind (Priest) on Feb 15, 2011 at 19:35 UTC | |
by kosta (Sexton) on Feb 15, 2011 at 20:00 UTC | |
|
Re: passing a hash to module function
by Marshall (Canon) on Feb 15, 2011 at 18:56 UTC | |
by chromatic (Archbishop) on Feb 15, 2011 at 19:02 UTC | |
by kosta (Sexton) on Feb 15, 2011 at 19:08 UTC | |
by Marshall (Canon) on Feb 15, 2011 at 19:27 UTC | |
|
Re: passing a hash to module function
by bprice (Acolyte) on Feb 17, 2011 at 10:04 UTC |