Normal Perl Script Testing
- Make sure SendMail, MIME::Base64 and MIME::QuotedPrint modules are installed.
- Check testSendMail.pl for modifications that you need to do. And welcome.gif is in this directory.
- Run the script in command line. ("perl testSendMail.pl" in unix system.)
- If SendMail.pm is not in the standard search path of perl, add the following line to the top of the SendMail.cgi script:
use lib qw(/path/of/directory/where/this/SendMail.pm/is/saved);Or just run the command:
OR
BEGIN { push(@INC, "/path/of/directory/where/this/SendMail.pm/is/saved"); }perl -I/path/of/directory/where/this/SendMail.pm/is/saved testSendMail.plFor MIME::Base64 and MIME::QuotedPrint, change the path to: /path/of/directory/where/MIME/directory/is
(Not where Base64.pm and QuotedPrint.pm are.)
Perl CGI Testing
- Make sure SendMail, MIME::Base64 and MIME::QuotedPrint modules are installed.
- Check SendMail.cgi for modifications that you need to do. And welcome.gif is in this directory.
- Change the file mode of SendMail.cgi to be executable. ("chmod 755 SendMail.cgi" in unix system.)
- Go to Testing Page For SendMail.cgi to do a test. Very simple, just fill in the form and submit it, you will see the result.
- If SendMail.pm is not in the standard search path of perl, add the following line to the top of the SendMail.cgi script:
use lib qw(/path/of/directory/where/this/SendMail.pm/is/saved);For MIME::Base64 and MIME::QuotedPrint, change the path to: /path/of/directory/where/MIME/directory/is
OR
BEGIN { push(@INC, "/path/of/directory/where/this/SendMail.pm/is/saved"); }
(Not where Base64.pm and QuotedPrint.pm are.)
Perl CGI Testing Without Telnet Access
- Upload the files in this directory into your web server.
- Upload SendMail.pm into the same directory.
- Upload Base64.pm and QuotedPrint.pm into sub directory called "MIME" if these modules are not installed.
- Make sure SendMail.cgi is executable.
- Go to Testing Page For SendMail.cgi to do a test. Very simple, just fill in the form and submit it, you will see the result.
Possible Errors
- Path of perl is not correct at the first line of the script. Get the correct path from your web administrator.
- SendMail.pm is not inside the perl's search path directories. Add the following line to the top of the SendMail.cgi script:
use lib qw(/path/of/directory/where/this/SendMail.pm/is/saved);For MIME::Base64 and MIME::QuotedPrint, change the path to: /path/of/directory/where/MIME/directory/is
OR
BEGIN { push(@INC, "/path/of/directory/where/this/SendMail.pm/is/saved"); }
(Not where Base64.pm and QuotedPrint.pm are.)- You have not selected your SMTP server or the server that you run your script at doesn't have a SMTP server running on it.
- Relaying denied, most of the SMTP servers don't support relaying to avoid spamming. You really need to find one for your script.
- MIME::Base64 and MIME::QuotedPrint are not installed.
For any comments, bugs or questions, you are welcome to send an email to tneohcb@pc.jaring.my.