Hi Ignacio --

This mailing list is *NOT* for general Perl CGI questions.  For general 
questions, go to the USENET groups comp.lang.perl.misc or 
comp.infosystems.www.authoring.cgi.


This mailing list is for users of the CPAN Perl module "CGI::Application":

  http://search.cpan.org/dist/CGI-Application/

You can find out more about this module at:

  http://www.perl.com/pub/a/2001/06/05/cgi.html


-Jesse-



> -----Original Message-----
> From: Ignacio Nieto [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, January 22, 2006 10:57 AM
> To: [email protected]
> Subject: [cgiapp] FORM MAIL error
> 
> Dear Mark and all
> 
> I test the CGI with these form had these form and
> doesnt work. Could somebody help me' Thanks Ignacio
> 
> <html>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN"
> "http://www.w3.org/TR/1999/REC-html401-19991224";>
> 
> <head>
> <title>undefefined</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1">
> <style type="text/css">
> <!--
> 
> #first {
> font-family:verdana;
> font-size:12px;
> color:#fff;
> background:#000;
> }
> 
> //-->
> </style>
> 
> <script type="text/javascript">
> <!--
> 
> var parrafo1 = new Array("a1", "a2");
> var parrafo2 = new Array("b1", "b2");
> var parrafo3 = new Array("c1", "c2");
> 
> 
> 
> function RandomTitle(nameform) {
> a = Math.floor(Math.random() * parrafo1.length);
> b = Math.floor(Math.random() * parrafo2.length);
> c = Math.floor(Math.random() * parrafo3.length);
> nameform.first.value=parrafo1[a] + parrafo2[b] +
> parrafo3[c];
> document.forms[0].submit();
> }
> 
> //-->
> 
> </script>
> 
> </head>
> <body>
> 
> <form action="cgi-bin/forma.cgi" method="post">
> 
> <table><tr>
> <td height="31" width="278">
> <input type="submit" name="generate" value="abrir"
> onclick="RandomTitle(this.form)">
> </td>
> </tr><tr>
> <td>
> <textarea id="first" name="first" cols="30" rows="4"
> ></textarea>
> </td>
> </tr></table>
> 
> </form>
> 
> </html>
> 
>  
> 
> #!/usr/bin/perl
> # Enter the location of sendmail.
> $mailprogram = "/usr/sbin/sendmail -t -i
> [EMAIL PROTECTED]";
> 
> # Enter your e-mail address.  Be sure to put a \
>  in
>  front of the @.
>  # ([EMAIL PROTECTED] becomes [EMAIL PROTECTED])
>  $youremail = "[EMAIL PROTECTED]";
> 
>  read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>  @pairs = split(/&/, $buffer);
>  foreach $pair (@pairs) {
>          ($name, $value) = split(/=/, $pair);
>          $value =~ tr/+/ /;
>          $value =~
> s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>          $FORM{$name} = $value;
> }
> 
> open (MAIL,"|$mailprogram");
> print MAIL "To: $youremail\n";
> print MAIL "$FORM{'linea1'}\n";
> print MAIL "$FORM{'linea2'}\n";
> print MAIL "$FORM{'linea3'}\n";
> print MAIL "$FORM{'linea4'}\n";
> print MAIL "$FORM{'linea5'}\n";
> print MAIL "$FORM{'linea6'}\n";
> 
> 
> 
> > On 2006-01-13, Ignacio Nieto
> > <[EMAIL PROTECTED]> wrote:
> > > Hello
> > >
> > > I had a the following script. Is there any
> > posibility
> > > to send mail to another emails account that belong
> > to
> > > other domains?
> > >
> > >
> > > thank you 
> > > Ignacio
> > >
> > > #!/usr/bin/perl
> > > # Enter the location of sendmail.
> > > $mailprogram = "/usr/sbin/sendmail -t -i
> > > [EMAIL PROTECTED]";
> > >
> > > # Enter your e-mail address.  Be sure to put a \
> > in
> > > front of the @.
> > > # ([EMAIL PROTECTED] becomes [EMAIL PROTECTED])
> > > $youremail = "[EMAIL PROTECTED]";
> > >
> > > read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
> > > @pairs = split(/&/, $buffer);
> > > foreach $pair (@pairs) {
> > >         ($name, $value) = split(/=/, $pair);
> > >         $value =~ tr/+/ /;
> > >         $value =~
> > > s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> > >         $FORM{$name} = $value;
> > > }
> > >
> > > open (MAIL,"|$mailprogram");
> > > print MAIL "To: $youremail\n";
> > > print MAIL "$FORM{'linea1'}\n";
> > > print MAIL "$FORM{'linea2'}\n";
> > > print MAIL "$FORM{'linea3'}\n";
> > > print MAIL "$FORM{'linea4'}\n";
> > > print MAIL "$FORM{'linea5'}\n";
> > > print MAIL "$FORM{'linea6'}\n";
> > >
> > >
> > > close MAIL;
> > 
> > Certainly. You are allowing the query string to
> > become part of your
> > header. So simply:
> > 
> >
> script.cgi?linea1=Bcc:[EMAIL PROTECTED],[EMAIL PROTECTED]
> > 
> > Even for simple web to emails, I might still use
> > CGI.pm for the query
> > processing, MIME::Lite for the e-mail building, and
> > HTML::Template
> > to seperate the design from the program. 
> > (HTML::Template works fine for
> > e-mail templates despite the name.
> > 
> >     Mark
> > 
> > 
> >
> ---------------------------------------------------------------------
> > Web Archive: 
> >
> http://www.mail-archive.com/[email protected]/
> >              
> > http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>               
> ______________________________________________ 
> LLama Gratis a cualquier PC del Mundo. 
> Llamadas a fijos y móviles desde 1 céntimo por minuto. 
> http://es.voice.yahoo.com
> 
> ---------------------------------------------------------------------
> Web Archive:  http://www.mail-archive.com/[email protected]/
>               http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to