Thanks to all,

it working!!!

RobR: for $i,I thinking i need give parameter into table before use it.

fi each "ARGV" i put " from ' and it working

the correct script is :
#!/usr/bin/perl -w

use Mail::Sender;


$sender = new Mail::Sender
{smtp => 'server.smtp.com', from => '[EMAIL PROTECTED]'} or die $!;
$sender->MailFile({to => '[EMAIL PROTECTED]',
                   subject => "$ARGV[0]",
                   msg => "$ARGV[1]",
                   file => "$ARGV[2]"});


$sender->Close;


Thnks to all.

Damien

---------- Initial Header -----------

>From      : "Kipp, James" <[EMAIL PROTECTED]>
To          : "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>,"Kipp, 
James" <[EMAIL PROTECTED]>,beginners <[EMAIL PROTECTED]>
Cc          :
Date      : Fri, 20 Dec 2002 09:26:34 -0500
Subject : RE: newbie

> >
> > #!/usr/bin/perl
> >
> > use Mail::Sender;
> > $i = scalar (@ARGV);
> >
> > $sender = new Mail::Sender
> > {smtp => 'server.smtp.com', from => '[EMAIL PROTECTED]'};
> > $sender->MailFile({to => '[EMAIL PROTECTED]',
> >                    subject => '$arg[0]',
> >                    msg => "$arg[1]",
> >                    file => '$arg[2]'});
> >
> > $sender->Close;
> >
> >
> > this script call as following :
> > sendmail.pl <subject> <body> <path to attachment>
> >
>
> I never use this module, so i am not familiar with it.
> Have you read the docs for Mail::Sender ? It looks like you are using the
> example from the docs.
>
> here is what i think you want:
> --
> # enable warnings
> #!/usr/bin/perl -w
>
> use Mail::Sender;
> # i don't think you need this line
> #$i = scalar (@ARGV);
>
> # add some error checking
> # i don't think these are the real names of your server and email
> # addresses, you need to replace them with the your own
> # you want $ARGV not $arg
> $sender = new Mail::Sender {smtp => 'server.smtp.com', from =>
> '[EMAIL PROTECTED]'} or die $!;
> $sender->MailFile({to => '[EMAIL PROTECTED]',
>                    subject => '$ARGV[0]',
>                    msg => "$ARGV[1]",
>                    file => '$ARGV[2]'});
>
> $sender->Close;
>
>
>
>
>
>
>
-------------
SPECIAL ADSL
L'ADSL Tiscali est à partir de 15,95 EUR/mois ! Plus modem ADSL et frais d'activation 
gratuits !
Pour profiter de cette offre, cliquez ici: http://register.tiscali.fr/adsl/
Offre soumise à conditions.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to