View Full Version : FormMail help required~
Monkeyace
06-25-2009, 06:16 PM
Im in desperate need of help, this script keeps throwing up a 500 error for me, and ive tried literally everything to get it working. Help would be much appreciated.
The script is FormMail by Matt Wright
http://www.paste.to/v/ral301ns <- the code
FishMonger
06-25-2009, 06:40 PM
Matt's script is not written very well. It would be best to replace it with the FormMail script from the NMS project, which is a drop-in replacement for Matt's script.
Oops, I forgot to give you the link.
http://nms-cgi.sourceforge.net/scripts.shtml
RabidMango
07-16-2009, 12:43 PM
Im in desperate need of help, this script keeps throwing up a 500 error for me, and ive tried literally everything to get it working. Help would be much appreciated.
The script is FormMail by Matt Wright
http://www.paste.to/v/ral301ns <- the code
But what's "everything"?
- chmodding it properly
- checking the file is saved in the correct format (i.e. the linebreaks/returns haven't been made inappropriate by saving it on one o.s. and then using it on a different one after ftping it - eg mac to pc, or anything and linux... it's a possibility)
- being sure that anything you've added (specific fields) has been done correctly and you haven't accidentally removed a " or something
I can't think of much else - what else did you do to try and solve the problem?
Have you thought of trying to put it together yourself - sending mail from cgi is very easy - no one really needs a readymade script...
here are some meccano parts for you -
$sendmailpath="/usr/sbin/sendmail";
open (SENDMAIL, "| $sendmailpath -t");
below there are also bits for sending attachments, but i didn't include the previous stuff for building up to it since you don't wanna get too confused too early
print SENDMAIL "Subject: $subject\n";
print SENDMAIL "From: $from\n";
print SENDMAIL "To: $to\n";
#print SENDMAIL "Cc: $cc\n";
print SENDMAIL "Bcc: $bcc\n";
print SENDMAIL "Mime-Version: 1.0\n";
print SENDMAIL "Content-Type: multipart/mixed; ";
print SENDMAIL "boundary=\"$BOUNDARY\"\n";
print SENDMAIL "\n\n";
print SENDMAIL "--$BOUNDARY\n";
print SENDMAIL "Content-Type: text/plain; charset=us-ascii\n";
print SENDMAIL "\n";
print SENDMAIL "$MSG\n$bmsg\n";
print SENDMAIL "--$BOUNDARY\n";
print SENDMAIL "Content-Type: $wotsit\n";
print SENDMAIL "Content-Transfer-Encoding: base64\n";
print SENDMAIL "\n";
# print SENDMAIL `$GZIP "$file"`;
# BASE64 Encode it and include it in the message
# print SENDMAIL `$MMENCODE "$file"`;
print SENDMAIL "$encodata";
print SENDMAIL "\n--$BOUNDARY--";
close (SENDMAIL);
RabidMango
07-16-2009, 12:51 PM
I solved your problem, though:
$ perl jobby
Array found where operator expected at jobby line 47, at end of line
syntax error at jobby line 47, near "name@domain"
Execution of jobby aborted due to compilation errors.
so let's have a peek...
@recipients = &fill_recipients(name@domain.com);
is where it is going wrong
you need to solve that - i have no idea what any of it is doing anyway
it's apparently some newfangled anti-spam system, very basic.
who knows what you should be putting in there - but maybe the @ without any \ has something to do with it, or the lack of "s, who knows
if you put name@domain.com in "s it does actually work...
try it.
but the backslash idea was no good. just me shooting rounds off in the dark.
anyway there you go, i have solved it for you - put quotemarks around that email address (although perhaps changing it to your email first would be wise)
vBulletin® v3.8.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.