I tried using this code but it's giving error.
Can you explain in details pls as this is my first perl script & don't know
much of programming.
Thanks
Nilanjana
---------------
> On Wed, 4 Feb 2004 14:07:43 +0530, [EMAIL PROTECTED] (Nilanjana
> Bhattacharya) wrote:
>
> >Hello everybody,
> >
> >I have two radio buttons in a form. I want - When any one clicks on
button "A"
> >a mail will be sent to "A" & when any one clicks on button "B" mail will
be
> >sent to button "B". In both the cases whether someone clicks on A or B I
will
> >receive a mail. Can anyone help me with the coding pls?
>
> Well here is some untested code which will give you a start.
>
> #!/usr/bin/perl
> use warnigs;
> use strict;
> use MIME::Lite;
> use CGI 'param';
>
> # Assign variables to arguments
> # you need your html form to send these
> my $a = param{'button_a_address'} || undef;
> my $b = param{'button_b_address'} || undef;
>
> my $me = '[EMAIL PROTECTED]';
> my $addr;
>
> if(defined $a){$addr = $a}else{$addr = $b}
>
> my $msg = MIME::Lite->new(
> >From =>'[EMAIL PROTECTED]',
> To =>$addr,
> Bcc =>$me,
> Subject =>'test message',
> Type =>'TEXT',
> Data =>'This is a test',
> );
> $msg->attach(Type =>'application/octet-stream',
> Encoding =>'base64',
> Path =>'test.zip',
> );
> $msg->send;
>
> # Print HTML Out
> print "Content-type: text/html\n\n";
> print <<"END";
> <html>
> <head>
> <title>Mail Sent!!</title>
> </head>
> <br>
> <center>
> <br><br>The file has been successfully sent to
> print $addr;
> </center>
> </body>
> </html>
> **END**
> __END__
>
>
>
> --
> When life conspires against you, and no longer floats your boat,
> Don't waste your time with crying, just get on your back and float.
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>