{from => 'navette@mat.ensmp.fr', smtp =>'mail.materiaux.ensmp.fr'};
constructs an anonymous hash, which should be the argument to new (the object constructor) and not to use. Just switch the second and third line:
use Mail::Sender ; my $sender = Mail::Sender->new {from => 'navette@mat.ensmp.fr', smtp =>'mail.materiaux.ensmp.fr'} +;
In the code above, I have also changed the indirect notation (new Mail::Sender) to direct method invocation. Indirect notation is bad practice unless you know what you do (Indirect notation will bite you if e.g. you have a new() function in the current package, or in some included module you inherit from, which is closer to the current package in the inheritance chain.)
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: erreur : "HASH(0x97f5b20)" is not exported by
by shmem
in thread erreur : "HASH(0x97f5b20)" is not exported by
by MarcB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |