follow-up questions on Mail::Send
Hi, I have used small single package named as X.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 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!! 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
Re: follow-up questions on Mail::Send
ZHAO, BING wrote: 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. Well, that's not how you install modules. Read the README inside the MailTools tarball. And read perldoc perlmodinstall. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: follow-up questions on Mail::Send
-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 X.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
Re: follow-up questions on Mail::Send
Oh, I indeed did what you'll just told me to do: 1. I first downloaded this MailTools-1.67.tar.gz 2. ungziped it 3. cd MailTools-1.67 4. Moreed Readme, followed the instructions, until the last step, make install failed, still lots of files including a lib/ were generated. 5. Tried to run my file. Error! Followed the error message, step by step, (errors mostly are can't find Send.pm etc), that's how I went into the Mailtoos-1.67 =lib=Mail. to get the Send.pm and saved it in my current directory. 6. Then it finally seemed to be working. But got stuck, a dead.letter is generated every time. No email was sent whatsoever. I am just perl beginner and doing bioperl most of time and it would cost me 6 months at least to read the Camel book. Then I would understand what the modules really are saying. I don't believe anyone cares how the modules are coded, just trying to get them to work in your script. That's exactly what I am doing. And no, it didn't work. help me and tell me what I did was wrong. Tell you the truth, I don't understand how the Mail::Send is coded, nor I believe many of people in this list do, nor anyone in this list cares how Mail::Send is coded. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: follow-up questions on Mail::Send
ZHAO, BING wrote: Oh, I indeed did what you'll just told me to do: 1. I first downloaded this MailTools-1.67.tar.gz 2. ungziped it 3. cd MailTools-1.67 4. Moreed Readme, followed the instructions, until the last step, make install failed, still lots of files including a lib/ were generated. Are you on Unix? I'm assuming you are. You need to run make install as root. If you don't have root access, you need to read the following: perldoc -q 'How do I keep my own module/library directory?' I am just perl beginner and doing bioperl most of time and it would cost me 6 months at least to read the Camel book. Then I would understand what the modules really are saying. I don't believe anyone cares how the modules are coded, just trying to get them to work in your script. That's exactly what I am doing. And no, it didn't work. help me and tell me what I did was wrong. Tell you the truth, I don't understand how the Mail::Send is coded, nor I believe many of people in this list do, nor anyone in this list cares how Mail::Send is coded. What you're doing wrong is failing to learn how to properly install modules. You'll save yourself a lot of headaches if you get this process down pat. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: follow-up questions on Mail::Send
-Original Message- From: ZHAO, BING [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 4:09 PM To: beginners@perl.org Subject: Re: follow-up questions on Mail::Send Oh, I indeed did what you'll just told me to do: 1. I first downloaded this MailTools-1.67.tar.gz 2. ungziped it 3. cd MailTools-1.67 4. Moreed Readme, followed the instructions, until the last step, make install failed, still lots of files including a lib/ were generated. 5. Tried to run my file. Error! Followed the error message, step by step, (errors mostly are can't find Send.pm etc), that's how I went into the Mailtoos-1.67 =lib=Mail. to get the Send.pm and saved it in my current directory. 6. Then it finally seemed to be working. But got stuck, a dead.letter is generated every time. No email was sent whatsoever. We need to back up a bit. What OS are you running on? As I stated in an earlier reply, Mail::Send requires access to a mail client (such as mail or mailx on *NIX system). If you're running on a Windows system, that's a whole other ball game. Please provide your OS specifics and the entire script that you wrote. I am just perl beginner and doing bioperl most of time and it would cost me 6 months at least to read the Camel book. Then I would understand what the modules really are saying. I don't believe anyone cares how the modules are coded, just trying to get them to work in your script. That's exactly what I am doing. And no, it didn't work. help me and tell me what I did was wrong. Tell you the truth, I don't understand how the Mail::Send is coded, nor I believe many of people in this list do, nor anyone in this list cares how Mail::Send is coded. Be careful when making assumptions and sweeping statements. ;) From my experience, many Perlers in fact do like to know how things work under the hood. I for one would like to write a module of my own one day; reading through a module's code helps me to understand how to go about doing that. ry -- 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