Yes, I'm using print "Content-type: text/html"; to print the browser reply, but not in the email content.
I'm not using use CGI qw(:standard) in any of the scripts.
Bearing in mind the email in the first script works perfect, but in the second it does not??
Cheers
Colin
At 11:05 a.m. 29/02/2004 -0900, you wrote:
That's odd, usually Apache comes complete with a directory directive for .cgi and not .pl, so that is must be added to the Apache directive lines for the use of these extensions. Based on the use of the \@ I am also to wonder if you stipulated up top with regard to the content of your output (i.e. print "Content-type: text/html\n\n"; and using quoted words (ie. use CGI qw(:standard))); in the beginning of either script. These may be two things to look into.
Res Ipsa Loquitor,
Mark-Nathaniel Weisman
Site Master
Mystic1.net
- -----Original Message-----
- From: Support [mailto:[EMAIL PROTECTED]]
- Sent: Sunday, February 29, 2004 10:50 AM
- To: [EMAIL PROTECTED]
- Subject: Email problem
- 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
- ------------------------------------------------------------------------------------------------
Incoming 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
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>