"Uri Guttman" <[email protected]> writes:
>>>>>> "HP" == Harry Putnam <[email protected]> writes:
>
> HP> About that module Mail::Mailer. I still have lots of trouble reading
> HP> code or docu written in the OOp format like the docs for that module.
> HP> The part I'm asking about is clear enough, but I couldn't find in the
> HP> body of the docu, what it really meant in use.
>
> what is the OO format of the docs? no such thing.
Uri, I think you like to argue.
Is this a new `$mailer' OBJECT?
$mailer = Mail::Mailer->new;
And just for the record, I wasn't jamming the docs but my own
shortcomings. I find the notations and such of Object Oriented
Programming confusing... I'm still struggling with regular
programming.
>
> HP> SYNOPSIS
> HP> use Mail::Mailer;
> HP> use Mail::Mailer qw(mail); # specifies default mailer
>
> HP> The second one there: `use Mail::Mailer qw(mail);'
>
> do you know the meaning of the word 'default' ? :)
Seem obvious now... but if that is all that was meant I would expect
instead of
use Mail::Mailer qw(mail);
Something that indicates the part inside of qw() is a value that might
be different everywhere. Programmers seem to often use uppercase in
those kinds of places.
use Mail::Mailer qw(YOUR_MAILER);
or
use Mail::Mailer qw(MAILER);
> HP> Could that be used to replace:
>
> HP> use Mail::Mailer;
>
> HP> #my $mailer = Mail::Mailer->new( 'sendmail', '/usr/sbin/sendmail' ) ;
> HP> my $mailer = Mail::Mailer->new( 'qmail' ) ;
> HP> #my $mailer = Mail::Mailer->new( 'smtp', 'Server' =>
> 'outgoing.verizon.net') ;
> HP> [...]
>
> HP> With:
>
> HP> use Mail::Mailer qw(mail);
>
> HP> my $mailer = Mail::Mailer->new;
> HP> [...]
>
> have you tried it?
I did yes, but didn't understand the error it produced. I see now it
was just looking for a module named `mail.pm' in @INC.
I also noticed that just plain:
use Mail::Mailer;
And
$mailer = Mail::Mailer->new;
(Rather than:
`$mailer = Mail::Mailer->new( 'sendmail', '/usr/sbin/sendmail' ) ;'
seems to work ok too)
$mailer->open( {
To => $recip,
From => '[email protected]',
Subject => 'EV ' . $subj,
}
) ;
print $mailer $body;
$mailer->close() ;
seems to works just fine. It somehow finds sendmail without the other
arguments.
Uri writes:
> . . . . . . . . . . . . . you are overthinking here. ...
I'm going to have to take that as a compliment. My usual failing is
the reverse..
Thanks.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/