Dear Dan
How do I add -u $fromaddress to the system() call in your script.
Bearing in mind its in PERL..
Many thanks in anticipation,
Alexis
-----Original Message-----
From: Dan Shadix [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 14:35
To: [EMAIL PROTECTED]
Subject: RE: [IMail Forum] Perl variable names
Maybe I'm mis-reading your request but I'm not sure what you mean.
If you mean how do you set the From: on the command line of Imail1.exe then
use -u.
Have them enter their e-mail address in a text field.
Assign the value to $fromaddress.
Add -u $fromaddress to the system() call in your script.
If that wasn't what you meant then maybe you can restate your question.
Dan
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alexis
Khilkoff-Boulding
Sent: Thursday, March 29, 2001 3:05 AM
To: '[EMAIL PROTECTED]'
Subject: [IMail Forum] Perl variable names
I have a perl script to send mail from a webpage to Imail:
it has these variables:
$imail = "C:\\Imail\\imail1.exe";
$temp_msg = "C:\\Temp\\outmail$$.txt";
$temp_ccmsg = "C:\\Temp\\outmail2$$.txt";
$subject = 'Website Feedback';
$toaddress = '[EMAIL PROTECTED]';
I wish to know how to set the FROM address to the value of the form element
named 'from' I am presuming that Imail has some variable name like
$toaddress, ( but i
cant get my guess of $fromaddress
to work.
Please could you enlighten me.
Thanks
Alexis
----------------------------------------------------------------
here is the full script below:
#!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 = '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";
# Finish writing to file
close MAIL;
system ("$imail -f $temp_msg -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/
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/
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/