Hi all
This may be more appropriate in another perl forum, but I'll ask any way.
 I have two perl scripts, 1 running in the cgi-bin with a browser and an email output and the email address to me at [EMAIL PROTECTED] and this runs fine. I have another perl script running in another folder(out side the cgi-gin). This second script runs fine (browser output) but the email does not work correctly(I get a default from [EMAIL PROTECTED]). The email part of the script is identical in both. But in the second script the server bulks at the email address of [EMAIL PROTECTED] and will only run on [EMAIL PROTECTED] (note the \)
Sheabang line in both scripts are lines are  #!/usr/bin/perl  and the email directive is /usr/sbin/sendmail 
First script is /home/myplace/www/cg-bin/script1.pl and the second is /home/myplace/www/anotherfolder/script2.cgi. Is there something between a .pl and a .cgi extension.???

1st Script:
open (MAIL, "|$mailprog -t") or &error($errmsg = "Can't access $mailprog!\n");
print MAIL
"To: $recipient\n";
print MAIL
"From: $contact\n";
print MAIL
"Reply-to: $contact\n";
print MAIL
"Subject: $subject\n\n";
print MAIL
" -------------------------------------------------------\n";
print MAIL
" The following form was sent by: $yname\n";
print MAIL
" on $date\n\n";
print MAIL
" -------------------------------------------------------\n\n";
foreach $key (keys(%FORM)) {
print MAIL
"$key : $FORM{$key}\n\n";
}
close(MAIL);

2nd Script:
open (MAIL, "|$mailprog -t") or &error($errmsg = "Can't access $mailprog!\n");
print MAIL
"To: $recipient\n";
print MAIL
"From: $vendorname\n";
print MAIL
"Reply-to: $vendormail\n";
print MAIL
"Subject: $subject\n\n";
print MAIL
" -------------------------------------------------------\n";
print MAIL
" $vendorname has updated the calendar\n";
print MAIL
" to the Myplace Listing Calendar Database\n";
print MAIL
" on $tdate.\n\n";
print MAIL
" -------------------------------------------------------\n\n";
close (MAIL);

I've pondered on this for some time now before coming to you gurus. If you can shed some light on the subject for me great.
Cheers
Colin

-----------------------------------------------------------------------------------------------
www.rentmyplace.co.nz
The ultimate in that holiday spot away from the maddening crowd
Join as a member today its FREE
List your holiday accommodation for FREE
------------------------------------------------------------------------------------------------


Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.224 / Virus Database: 261.9.11 - Release Date: 28/02/2004

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Reply via email to