[ back to toc ]

email script 500 error

Date: 2002/05/09 12:56

Hello Mr. Verhas,

I'm just learning how to script in Perl. For the last few days I've been
stumped by this simple mail order script I made. I'm thinking it's a
server side error because I've run this script through Perl Builder and
through the DOS command line and it works just fine.

It's really a trivial script. I just have a few text boxes to enter
values. When the user submits their form, it simply sends an email to me
with the form values and to a webpage so that I know it's working okay.
At least it's supposed to do that.

However, I'm getting a 500 "No recipient addresses found in header" error.
I know that can mean anything, really, but I thought I defined the
recipient in my code. Does it have to do with Sendmail?

Here is the form:

And the order.cgi code for you to see:

And the exact specifications of the server I'm running this on:

I'm new at this so maybe I'm tackling this totally wrong. My server
charges $35/hour to help with CGI scripts. But this thing is so
elementary school, I'm embarrassed to ask them for help. But it's gotten
so frustrating, I'm about to give up trying to learn Perl all together.
Please could you help me out?

Thank you in advance,

$recipient =('pretzel\@austin.rr.com');

should be

$recipient = 'pretzel@austin.rr.com';

I am not quite sure that this is the issue, but this seems to be something

There is another issue in your code that you did not mention. The code
prints the HTTP header in the BEGIN section. This is printed when the
syntax analysis of the program reaches the closing } after the BEGIN
block. Therefore anything that the program prints gets into the HTML text
code. Even

# print values to webpage/output just in case
print "Content-type: text/html\n\n";

this text.


[ back to toc ]