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]

Reply via email to