> -----Original Message-----
> From: ZHAO, BING [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 17, 2005 12:15 AM
> To: Bob Showalter
> Cc: beginners@perl.org
> Subject: New on Mail::Send
> 
>               I am on Windows XP home edition. I have this software
Secure
> Shell which tunnels to
> a remote host(unix). The remote is very strictly managed, any
installation
> of anything would
> require me to talk to/call up the system administator(this is national
> security). Then I have this
> home-made module directory, just a dir with lots of *.pm files, I have
got
> away without actually
> downloading any module for a while. ( I usually just copy and paste
the
> raw source code and save
> it under my module dir)
>               Any 'make install' would result in Error. Since what I
am
> doing is relatively
> simple, I just dug out the required module from the MailTools-1.67/,
like
> Mail::Send, Mail::Mailer
> etc and save them into my secret home-made module dir and set path to
it.
> 
> 
>               STOP: any suggestion for me on how to install modules
> correctly or any doubt for me
> on if I really want to learn to install modules, plz stop. I
appreciate
> your eagerness to show off
> your seniority. And stop making assumption, as I just stated case
clear
> enough. And when it comes
> down to learning/study, very few people could match my intensity.
> 
>               My point again: I am a perl beginner. I don't care how
the
> perl is developing and
> where perl is going. I am doing stuff way fancier than what you can
> imagine. I am current doing a
> project with web input and data anaylysis and email feedback. I need
to do
> them and not to think
> why and how perl is like this, why and how perl module works this way.
As
> long as it works, I am
> happy and I am making progress. If the purpose of being on this list
is to
> ask questions and help
> each other out, I am in for it.
> I have enough 'living-a-pumped-up-life' phylosophies from my
5,000-year
> cultural heritages.

Phew!  Feel better?  Take it easy there fella...

> 
> 
>               Here is my script:
> 
> require Mail::Send;
> $msg = new Mail::Send;
> $msg = new Mail::Send Subject=>'example subject', To=>'Bing Zhao';
> $msg->to('[EMAIL PROTECTED]');
> $msg->subject('example subject');
> $msg->cc('[EMAIL PROTECTED]');
> $fh = $msg->open;
> print $fh "Body of message";
> $fh->close;
> 

The script appears to be OK.  You're issue may not reside with the
script, though.  You should verify that you are able to actually send
mail via your local mail client (from the UNIX box, not the Windows
box).  Mail::Send expects a working mail client (mail, mailx, etc.).  If
you can't send mail, Mail::Send won't be able to either.

Try this from your prompt:

[EMAIL PROTECTED] mail -s "Some Random Subject"
[EMAIL PROTECTED]

<you may see a Cc: line next>

Some text for the body...

^D (Control-D)

<or you could see a Cc: line here>

If this fails to send the email, you have an issue outside of Perl and
Mail::Send.  You can even use the -v switch with mail/mailx to get more
verbose connection information.

ry

> 
> With no error regarding the whereabout of the necessary modules, I
assume
> I got the module thing
> right. Then every time, this 'dead.letter' is generated. I guess it's
part
> of the built-in
> function of Mail::Send, when the script fails to send the email.
Anyway,
> here is a copy of the
> dead.letter files:
> 
>  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
> 
> Any CONSTRUCTIVE suggestion on how I should modify my code?
> 
> thanks a lot.
> 
> 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>


Reply via email to