[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] regarding email subroutine



Salutations-
I downloaded this subroutine from the CGI-Cookbook written by Matthew Wright I have tried unsuccessfully to get this subroutine to work. The syntax checks out fine, but then when I try to run it I get all kinds of error messages, below is the subroutine:
#!perl -w

require 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:sendmail.pl';
require 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:base64.pl';
require 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:chkemail.pl';
require 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:error.pl';
require 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:uuencode.pl';

print "Content-type: text/plain\n\n";

$WEB_SERVER = '207.237.144.12';
$SMTP_SERVER = 'smtp.mulryan-nash.com';

$subject = 'This is another test. A more complicated test.';
$from = 'sender@domain.com (Sender Name)';
$to = 'dbrewer@mulryan-nash.com';
$body = 'this is a test of the emegency broadcast system';
$encoding = "text,base64";
if (&send_email($subject, $from, $to, '','',$body)) {
		print "$Error_Message\n";
}
else {
	print "The message '$subject', from $from to $to, has been sent.\n";
}
I'm sure that this is full of all sorts of potential problems and I've spent hours trying to figure out what went wrong and I'm near tears because I've looked at this code for hours and I can't figure out exactly where it goes wrong. I ran just the subroutine alone manually through MacPerl and all these problems came up. I figured that I could ignore the first few because all those elements were specified in the main cgi program. I'm running this program on a Mac 0s 8 system, which I've actually found to be very nice for what I want to do. Everything is where is supposed to be. All my other scripts work beautifully except this one.
# Name "main::encoding" used only once: possible typo.
File 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:sendmail.pl'; Line 18
# Name "main::Error_Message" used only once: possible typo.
File 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:sendmail.pl'; Line 20
# Name "main::SMTP_SERVER" used only once: possible typo.
File 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:sendmail.pl'; Line 12
# Name "main::WEB_SERVER" used only once: possible typo.
File 'alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:sendmail.pl'; Line 11
# alexandria:web:FileMaker Pro 4.0 Folder:Web:Jobs:sendmail.pl syntax OK

Seeing as this code was written by experts and I haven't really modified it in any way outside of what the book told me to do and I'm lost. I hat to run like a baby, but I just started learning this to build a web site. I'm kind of learning as I go along, so please forgive me.
Thank you in advance,
DesirŽe Arianne Brewer
dbrewer@mulryan-nash.com



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch