"Uri Guttman" <u...@stemsystems.com> writes: > here is a simple use of a module i like. note that it would be easy > to change the mailer if i wanted to. no need to know any > quirks/syntax of each mailer. also note the nice argument list of > the headers. > > #my $mailer = Mail::Mailer->new( 'sendmail', '/usr/sbin/sendmail' ) ; > my $mailer = Mail::Mailer->new( 'qmail' ) ; > #my $mailer = Mail::Mailer->new( 'smtp', 'Server' => 'outgoing.verizon.net') ; > > $mailer->open( { > To => $email, > From => 'u...@perlhunter.com', > Sender => 'u...@perlhunter.com', > Subject => $subject, > } > ) ; > > print $mailer $body_text ; > $mailer->close() ;
Uri, Sorry to take advantage of your willingness to help on perl matters, I should probably be bugging the author about this.... but I was pretty sure I'd hear some kind of answer much quick by bugging you :) About that module Mail::Mailer. I still have lots of trouble reading code or docu written in the OOp format like the docs for that module. The part I'm asking about is clear enough, but I couldn't find in the body of the docu, what it really meant in use. And the author doesn't really make this clear... at least not to me. At the Synopsis section: SYNOPSIS use Mail::Mailer; use Mail::Mailer qw(mail); # specifies default mailer The second one there: `use Mail::Mailer qw(mail);' Could that be used to replace: use Mail::Mailer; #my $mailer = Mail::Mailer->new( 'sendmail', '/usr/sbin/sendmail' ) ; my $mailer = Mail::Mailer->new( 'qmail' ) ; #my $mailer = Mail::Mailer->new( 'smtp', 'Server' => 'outgoing.verizon.net') ; [...] With: use Mail::Mailer qw(mail); my $mailer = Mail::Mailer->new; [...] In other words does use Mail::Mailer qw(mail); mean it will determine what is the default mailer wherever the script runs? So unless you want something different than default, use that notation? If not then do you know what it means? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/