paul_sutt
09-28-2006, 03:55 AM
Hi,
I'm new to this and have just nearly completed my first CGI script. I used BNB form first..process everything and returned a thanks page..but did not send any email data. So tried novice forms..same result...script runs ok, but email data is not being sent.
I believe then it may have something to do with sendmail or SMTP. Checked perl address and sendmail dir with host and they have told me they are correct, so i'm stuck!
I've attached the novice forms cgi script below (the editable part)
..please help!
#!/usr/bin/perl
## make sure the path to pearl is correct above. ##
##########################################################################################
## FILE: novice.cgi ##
## ##
## Novice Forms Version 1.1 ##
## © Copyright 2000-2003 Seth Michael Knorr mail@sethknorr.com ##
## ##
## http://www.noviceforms.com/ ##
## Please contact me with any bugs found, or any bug fixes. ##
## ##
## This script is a spin off of the original ©Biz Mail Form ##
## ##
##########################################################################################
## ##
## There is no email support provided for this script, the only support can be ##
## found at our web site: http://www.noviceforms.com/ ##
## ##
## ##
## ANY PERSON(S) MAY USE AND MODIFY THESE SCRIPT(S) FREE OF CHARGE FOR EITHER BUSINESS ##
## OR PERSONAL, HOWEVER AT ALL TIMES HEADERS AND COPYRIGHT MUST ALWAYS REMAIN IN TACT. ##
## ##
## REDISTRIBUTION FOR PROFIT IS PROHIBITED WITH OUT THE CONSENT OF SETH KNORR. ##
## ##
## By using this code you agree to indemnify Seth M. Knorr from any liability that ##
## might arise from its use. ##
## ##
## ##
##########################################################################################
## $sendto and $ccto is Where form submissions will be sent, ##
## (REMEMBER THE \ BEFORE THE @ SIGN example: \@) ##
## $sendto = "sendto\@yourdomain.com"; CORRECT WAY!!!! ##
## $sendto = "sendto@yourdomain.com"; WILL NOT WORK!!!! ##
$sendto = "paul_sutton123\@yahoo.co.uk"; ## (REMEMBER THE \ BEFORE THE @ SIGN)##
$ccto = "paul_sutton123\@yahoo.co.uk"; ## (REMEMBER THE \ BEFORE THE @ SIGN)##
## $useLib defines the method of sending the email form info to you. ##
## Set $useLib = "sendmail"; TO USE THE SENDMAIL METHOD ##
## Set $useLib = "smtp"; TO USE THE SMTP METHOD ##
$useLib = "sendmail";
$mailprog = "/usr/sbin/sendmail"; ## $mailprog Is the path to sendmail on your server ##
$smtp = "smtp.host.com"; ## Optional $smtp is your smtp server address ##
## example: smtp.host.com ##
## You only configure this is not using sendmail ##
## to use @okurls to verify the url the form is submited by; set $setokurl to 1 and ##
## set $setokurl to 0 if you do not want to use @okurls to verfiy form submission URL ##
$setokurl = "0";
@okurls = ("http://www.yourdomain.com", "http://yourdomain.com", "34.344.344.344");
####################################################################################################
############# #############
############# N O N E E D T O E D I T A N Y V A R I A B L E S B E L O W #############
############# #############
####################################################################################################
I'm new to this and have just nearly completed my first CGI script. I used BNB form first..process everything and returned a thanks page..but did not send any email data. So tried novice forms..same result...script runs ok, but email data is not being sent.
I believe then it may have something to do with sendmail or SMTP. Checked perl address and sendmail dir with host and they have told me they are correct, so i'm stuck!
I've attached the novice forms cgi script below (the editable part)
..please help!
#!/usr/bin/perl
## make sure the path to pearl is correct above. ##
##########################################################################################
## FILE: novice.cgi ##
## ##
## Novice Forms Version 1.1 ##
## © Copyright 2000-2003 Seth Michael Knorr mail@sethknorr.com ##
## ##
## http://www.noviceforms.com/ ##
## Please contact me with any bugs found, or any bug fixes. ##
## ##
## This script is a spin off of the original ©Biz Mail Form ##
## ##
##########################################################################################
## ##
## There is no email support provided for this script, the only support can be ##
## found at our web site: http://www.noviceforms.com/ ##
## ##
## ##
## ANY PERSON(S) MAY USE AND MODIFY THESE SCRIPT(S) FREE OF CHARGE FOR EITHER BUSINESS ##
## OR PERSONAL, HOWEVER AT ALL TIMES HEADERS AND COPYRIGHT MUST ALWAYS REMAIN IN TACT. ##
## ##
## REDISTRIBUTION FOR PROFIT IS PROHIBITED WITH OUT THE CONSENT OF SETH KNORR. ##
## ##
## By using this code you agree to indemnify Seth M. Knorr from any liability that ##
## might arise from its use. ##
## ##
## ##
##########################################################################################
## $sendto and $ccto is Where form submissions will be sent, ##
## (REMEMBER THE \ BEFORE THE @ SIGN example: \@) ##
## $sendto = "sendto\@yourdomain.com"; CORRECT WAY!!!! ##
## $sendto = "sendto@yourdomain.com"; WILL NOT WORK!!!! ##
$sendto = "paul_sutton123\@yahoo.co.uk"; ## (REMEMBER THE \ BEFORE THE @ SIGN)##
$ccto = "paul_sutton123\@yahoo.co.uk"; ## (REMEMBER THE \ BEFORE THE @ SIGN)##
## $useLib defines the method of sending the email form info to you. ##
## Set $useLib = "sendmail"; TO USE THE SENDMAIL METHOD ##
## Set $useLib = "smtp"; TO USE THE SMTP METHOD ##
$useLib = "sendmail";
$mailprog = "/usr/sbin/sendmail"; ## $mailprog Is the path to sendmail on your server ##
$smtp = "smtp.host.com"; ## Optional $smtp is your smtp server address ##
## example: smtp.host.com ##
## You only configure this is not using sendmail ##
## to use @okurls to verify the url the form is submited by; set $setokurl to 1 and ##
## set $setokurl to 0 if you do not want to use @okurls to verfiy form submission URL ##
$setokurl = "0";
@okurls = ("http://www.yourdomain.com", "http://yourdomain.com", "34.344.344.344");
####################################################################################################
############# #############
############# N O N E E D T O E D I T A N Y V A R I A B L E S B E L O W #############
############# #############
####################################################################################################