Then try the first method which I have suggested.
Make a diferent script say xx.pl and in the action of
the HTML form call this script.
In the xx.pl script collect parameter and also the
field name. For e.g
$Name = param ('name');
Now push all the values in an array.
push (@array,"Name=$Name");
in the subject of the mail write this array.
$smtp->datasend("@array\n");
Thanks
-Pijush
--- SHEIKH Sajjad <[EMAIL PROTECTED]> wrote:
> I want to send data like this
>
> Id=1
> Name=world.doc
> Description=..
> User name=..
> Etc etc
>
>
>
> -----Original Message-----
> From: pijush koley [mailto:[EMAIL PROTECTED]
> Sent: 05 December 2003 13:06
> To: SHEIKH Sajjad
> Cc: [EMAIL PROTECTED]
> Subject: RE: How do i send HTML Emails ?
>
>
> Hello Sajjad,
>
> Do you want to send only the values of the form or
> the
> whole HTML form with values?
> If you want to send only values of the HTML form
> then
> use this procedure:
> instead of this line
> print $query->start_form(-action =>
> 'some_action');
>
> write
> print $query->start_form(-action => 'xx.pl');
> this xx.pl file will send the mail. The mail routine
> will be present in this xx.pl file and also collect
> parameters in this file instead of the form itself.
>
> If you want to send the HTML file with data then it
> is
> little hard, because you need to write code for same
> HTML code (which is used for generate HTML in the
> form) and collect each parameter separetly and put
> the
> value in each field.
>
> This is not a good procedure, but this will work.
>
> Thanks
> Pijush
>
> --- SHEIKH Sajjad <[EMAIL PROTECTED]> wrote:
> > Hello Koley,
> >
> > Following script generates the dynamic form. I
> want
> > to send all the
> > form fields by email.
> >
> > Regards,
> > Sajjad
> >
> > #!Z:/bin/perl.exe -w --
> >
> > use strict; # get in the habit of using this and
> -w
> > above -
> > # it will save you grief in the long run. You
> > # can also use use warnings; instead of -w
> > use CGI;
> >
> > # To get the errors back to the browser:
> >
> > use CGI::Carp qw(fatalsToBrowser);
> >
> > # Output a content header prior to any text
> >
> > print "Content-Type: text/html\n\n";
> >
> > my $query = new CGI;
> > my @names = $query->param;
> >
> > #foreach (@names) {
> > # print "<BR>$_ = ", $query->param($_), "\n";
> > #}
> >
> > print $query->start_html(-title=>'Request Form');
> > print $query->h3(qq{Document Request Form for
> <font color="blue">}
> > .$query->param('name'), "</font>");
> >
> > print $query->start_form(-action =>
> 'some_action');
> > print $query->p("<table>");
> > print
> >
>
$query->p("<tr><td>ID:</td><td>".$query->textfield(-name=>'id',-size=>10
> > , -readonly),"</td></tr>");
> > print
> >
>
$query->p("<tr><td>Name:</td><td>".$query->textfield(-name=>'name',-size
> > =>10, -readonly), "</td></tr>");
> > print $query->p("<tr><td>Last
> >
>
Modified:</td><td>".$query->textfield(-name=>'lastmodified',-size=>10,
> > -readonly), "</td></tr>");
> > print
> >
>
$query->p("<tr><td>Description:</td><td>".$query->textfield(-name=>'desc
> > ription',-size=>10, -readonly), "</td></tr>");
> > print
> >
>
$query->p("<tr><td>Title:</td><td>".$query->textfield(-name=>'title',-ty
> > pe=>'radio', -size=>10), "</td></tr>");
> > print $query->p("</table>");
> > print $query->submit(-name=>'submit');
> > print $query->end_form();
> > print $query->end_html();
> >
> > -----Original Message-----
> > From: pijush koley [mailto:[EMAIL PROTECTED]
> > Sent: 04 December 2003 17:27
> > To: SHEIKH Sajjad
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: How do i send HTML Emails ?
> >
> >
> > Hi Sajjad,
> > Cau you tell me what type of data you want to
> send
> > along the mail?
> >
> > In my previous mail I wrote a line
> > my $Mail = Net::SMTP->new("$strMailServer");
> >
> > where $strMailServer must have a domain name or
> IP
> > and before you use the Net::SMTP module make sure
> > that
> > you can access the server i.e. the machine through
> > which you will send the mail.
> >
> > There is one more point, I also mentioned
> > my @Message = <message> #Note that message will
> > content a html file##
> >
> > So if you put only "hi" in @Messsage, you will not
> > see
> > any HTML magic in the mail. So make sure that
> > @Message
> > will contain the content of a HTML file.
> >
> > Thanks
> > -Pijush
> >
> > --- "Chacon-Taylor, Monique"
> <[EMAIL PROTECTED]>
> > wrote:
> > > I use sendmail to announce builds.
> > > Where
> > > @to=('[EMAIL PROTECTED]','[EMAIL PROTECTED]')
> > >
> > > $torepply= join(';',@to); make the addresses
> > appear
> > > correctly in outlook (; separated)
> > >
> > > I use a subroutine my_mail
> > >
> > > #-------------------------------------
> > > #sub my_mail
> > > #-------------------------------------
> > > sub my_mail{
> > > use Net::SMTP;
> > > my $string="see $ENV{TODIR}\\$build_name";
> > > close(MAIL);
> > > open(MAIL,"<$mail") or die "build.pl: my_mail:
> > > Cannot open $mail: error: $!\n";;
> > > my @log=<MAIL>;
> > > @log=("$subject\n",@log,"$string\n");
> > > close(MAIL);
> > > my $torepply= join(';',@to);
> > > $smtp = Net::SMTP->new($SMTPHOST);
> > > $smtp->mail($from);
> > > $smtp->recipient(@to, { SkipBad => 1 });
> > > $smtp->data();
> > > $smtp->datasend("To: $torepply\n");
> > > $smtp->datasend("Subject: $subject:
> $string\n");
> > > $smtp->datasend("\n");
> > > $smtp->datasend("@log\n");
> > > $smtp->datasend("\n");
> > > $smtp->dataend();
> > > $smtp->quit;
> > > return 1;
> > > }
> > >
> > > -----Original Message-----
> > > From: SHEIKH Sajjad
> > > [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, December 04, 2003 6:55 AM
> > > To: pijush koley; Story, Lenny
> > > Cc: [EMAIL PROTECTED]
> > > Subject: RE: How do i send HTML Emails ?
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs