Great Dan, sorry for the delay in comprehension ...
Here is what the complete working PERL script looks like if anyone needs it:
----------------------------------------------
#!C:/PERL/bin/Perl5.6.0.exe
$imail = "C:\\Imail\\imail1.exe";
$temp_msg = "C:\\Temp\\outmail$$.txt";
$temp_ccmsg = "C:\\Temp\\outmail2$$.txt";
$subject = 'AXL Website Feedback';
$toaddress = '[EMAIL PROTECTED]';
# html
print "Content-type: text/html\n\n";
$mday = (localtime)[3];
$mon = (localtime)[4] +1;
$year = (localtime)[5];
# $buffer = " ";
$buffer = $ENV{'QUERY_STRING'};
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
#Uncomment for debugging purposes
#print "Setting $name to $value<P>";
$FORM{$name} = $value;
}
$orderno = $year.$month.$day;
print "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=/sent.shtml\">\n";
# Create A temporary File to construct the e-mail
open (MAIL, ">$temp_msg") || die "open postmail or sendmail";
# Construct the e-mail
print MAIL "From: $FORM{'Name'}\n";
print MAIL "\n";
print MAIL "Name: $FORM{'Title'} $FORM{'Name'}\n";
print MAIL "Company: $FORM{'Company'}\n";
print MAIL "Address: $FORM{'Address'}\n";
print MAIL "Phone: $FORM{'Telephone'}\n";
print MAIL "Fax: $FORM{'FAX'} \t\tEmail: $FORM{'Email'}\n";
print MAIL "Comments: $FORM{'Comments'}\n";
print MAIL "\n";
print MAIL "\n";
print MAIL "Remote User: $ENV{'REMOTE_USER'}\n";
print MAIL "Server protocol: $ENV{'SERVER_PROTOCOL'}\n";
print MAIL "Remote host: $ENV{'REMOTE_HOST'}\n";
print MAIL "Remote IP address: $ENV{'REMOTE_ADDR'}\n";
print MAIL "\n";
$fromaddress = $FORM{'Email'};
close MAIL;
system ("$imail -f $temp_msg -u $fromaddress -s $subject -t $toaddress ");
# Remove the File
unlink $temp_msg;
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.
An Archive of this list is available at:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/