Sorry for the missing tags here goes again....
Thanx again for the time!
#! /usr/bin/perl
# ----------------------------------------------------
$mailprog = '/usr/sbin/sendmail';
$cuenta = 'inscripciones@ceadmex.org';
# Get the Date for Entry
$date = `date +"%A, %B %d, %Y at %T (%Z)"`;
chop($date);
$shortdate = `date +"%D %T %Z"`;
chop($shortdate);
# Get the input
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
# Split the name-value pairs
@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;
}
# Alta a variables
use CGI qw/:standard/;
$EMPR = param('empr');
$APPA = param('appa');
$APMA = param('apma');
$NOMB = param('nomb');
$EMAL = param('emal');
$TELE = param('tele');
$DIRE = param('dire');
$COLO = param('colo');
$CIUD = param('ciud');
$ESTA = param('esta');
$PAIS = param('pais');
$COPO = param('copo');
$CURS = param('curs');
################# Mandar Correo ############
open (MAIL, "|$mailprog $cuenta") || die "Can't open $mailprog!\n";
print MAIL "From: $EMAL\n";
print MAIL "Subject: DATOS\n\n";
print MAIL "--------------------------------------\n";
print MAIL "DATOS DE LA PERSONA\n";
print MAIL "Nombre: $NOMB $APPA $APMA\n";
print MAIL "Direccion: $DIRE $COLO $CIUD $ESTA $PAIS $COPO\n";
print MAIL "-----------------------------------\n";
print MAIL "DATOS DE LA RETROALIMENTACION\n";
print MAIL "EMPRESA: $EMPR $TELE\n";
print MAIL "CURSO" $CURS\n";
print MAIL "---------------------------------------\n";
print MAIL "-----------------------------------\n";
print MAIL "FECHA Y HORA DE ESTE FORMATO\n";
print MAIL " - $date\n";
print MAIL "---------------------------------------\n";
close (MAIL);
|