> -----Original Message----- > From: ZHAO, BING [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 16, 2005 3:26 PM > To: beginners@perl.org > Subject: follow-up questions on Mail::Send > > Hi, > I have used small single package named as XXXXX.pm before, > never big ones. But for > Mail::Send, I downloaded this huge file MailTools-1.67. I dug several > modules out like Send.pm, > Mailer.pm etc and saved them in the current directory. > Tried to run my file, but got this dead.letter generated: > > From bzhao Wed Nov 16 12:13:15 2005 > Return-Path: <bzhao> > Received: (from [EMAIL PROTECTED]) > by gly.lbl.gov (8.12.11/8.12.11/Submit) id jAGKDFRT011092; > Wed, 16 Nov 2005 12:13:15 -0800 > Date: Wed, 16 Nov 2005 12:13:15 -0800 > From: bing zhao <bzhao> > Message-Id: <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: example subject > To: [EMAIL PROTECTED] > > Body of message > > ************************************************************************ ** > ************************************************* > CONTENT OF MY runMail.pl: > > > require Mail::Send; > > $msg = new Mail::Send; > > $msg = new Mail::Send Subject=>'example subject', To=>'Bing Zhao'; > > $msg->to('[EMAIL PROTECTED]'); > #$msg->to('[EMAIL PROTECTED]', '[EMAIL PROTECTED]'); > $msg->subject('example subject'); > $msg->cc('[EMAIL PROTECTED]'); > #$msg->bcc('[EMAIL PROTECTED]'); > > #$msg->set($header, @values); > #$msg->add($header, @values); > #$msg->delete($header); > > # Launch mailer and set headers. The filehandle returned > # by open() is an instance of the Mail::Mailer class. > # Arguments to the open() method are passed to the Mail::Mailer > # constructor. > > $fh = $msg->open; # some default mailer > # $fh = $msg->open('sendmail'); # explicit > > print $fh "Body of message"; > > $fh->close; # complete the message and send it > > #$fh->cancel; # not yet implemented > > > > > Just copied and pasted from the Mail::Send synopsis and made minor > modifications. Don't know what > was wrong. Not really trying to understand how it worked, just want to be
Learning a little never hurts. > able to send a HTML link > to others. Say, To : [EMAIL PROTECTED] Subject: Hello, there! > Message: > www.berkeley.edu > That's all I have been dreaming for. Help me!! The simplest way to install a module is to use the appropriate package manager. If you're running *NIX, that would be 'cpan'; if you're running Windows (ActiveState Perl), use 'ppm'. Follow the relevant docs for installing modules. You can install from source if you want, but you need to know what you're doing (i.e. know where Perl looks for modules). ry > > thanks, > > best, > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>