RE: New on Mail::Send





> -----Original Message-----
> From: ZHAO, BING [mailto:littleshrimp@xxxxxxxxxxxx]
> Sent: Thursday, November 17, 2005 12:15 AM
> To: Bob Showalter
> Cc: beginners@xxxxxxxx
> 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('littleshrimp@xxxxxxxxxxxx');
> $msg->subject('example subject');
> $msg->cc('aolin00@xxxxxxxxxxxx');
> $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:

[pumpedup@xxxxxxxxxxx]$ mail -s "Some Random Subject"
littleshrimp@xxxxxxxxxxxx

<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 bzhao@localhost)
> 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: <200511162013.jAGKDFRT011092@xxxxxxxxxxx>
> Cc: aolin00@xxxxxxxxxxxx
> Subject: example subject
> To: littleshrimp@xxxxxxxxxxxx
>
> Body of message
>
> Any CONSTRUCTIVE suggestion on how I should modify my code?
>
> thanks a lot.
>
> best,
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
> For additional commands, e-mail: beginners-help@xxxxxxxx
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>

.



Relevant Pages

  • RE: ORA-12154 (DBD ERROR: OCIServerAttach)
    ... > Windows XP client ... > installation process) and also in the system environment variables ... > A perl script attempting connection works fine ONLY when the ...
    (perl.dbi.users)
  • Re: Dynamic content and search engines
    ... Winston Kotzan wrote: ... Is it possible to pass a parameter to my dynamic page script ... I have various sites, all in Perl. ... Apache passes various environment variables & it differs from installation ...
    (comp.lang.perl.misc)
  • Re: sendmail Help Please
    ... Argosoft Mailserver ... I send email form the script and all works ok ... Perl version $]. ... my $remote; ...
    (comp.lang.perl.misc)
  • Re: Copy folder to a remoted Computer then run executeable
    ... the remote workstation and then execute the batch file. ... > ok but doesn't return satisfactory error codes for the installation - ie ... > Dim fso, oFile ... >> Has anyone out there attempted to write a WSH script to do the following? ...
    (microsoft.public.scripting.wsh)
  • "Undefined subroutine"
    ... Trying to use an "old" script which I have not written myself. ... under installation on other machines. ... I am not experienced in Perl, so maybe the error is obvious. ...
    (comp.lang.perl.misc)