Gossamer Forum
Home : General : Perl Programming :

perl email from checkboxes - trouble

Quote Reply
perl email from checkboxes - trouble
CoolHello everyone:

I have written a perl script to take user inputted zip code and then send email to a sales rep. based on that zip code. Check out http://www.harvestgroupma.com/catalog.htm.

I am having problem with using @CATALOG Array in print "Sendmail..." structure. Does anyone know how to do this?

See code sample...attached file...



Thanks!

Tomsweb
Quote Reply
Re: [tomsweb] perl email from checkboxes - trouble In reply to
Hello Tomsweb,

In the HTML page each checkbox is named Company

In the perl script you are looking for Catalog.

Company != Catalog .

Try changing one or the other to match.

Thanks cornball
Quote Reply
Re: [cornball] perl email from checkboxes - trouble In reply to
BlushPoint well taken, cornball...however, in the sample html form I am using at my desktop <see attached> does have catalog consistently named throughout checkbox section of form.

I don't think that is the difference, do you?

Thanks for your answer!

Tomsweb
Quote Reply
Re: [tomsweb] perl email from checkboxes - trouble In reply to
Hello Tomsweb,

Upload the desktop html to the server

as :

my @CATALOG = $q->param('Catalog'); vs the current html file on the server has 'Company' as the name for all checkboxes.

which would work with my @CATALOG = $q->param('Company');


thanks cornball
Quote Reply
Re: [cornball] perl email from checkboxes - trouble In reply to
Unsure Sorry Cornball....it still does not work...

Feel free to try as you like. I am sorry this is not working out right now.

Tomsweb.
Quote Reply
Re: [tomsweb] perl email from checkboxes - trouble In reply to
Hello tomsweb

The last line of the email should also be:

print SENDMAIL ".\n\n";

just before close (SENDMAIL);

as if I remember correctly this tells sendmail the message is complete.


What part does not work ?

thanks cornball
Quote Reply
Re: [cornball] perl email from checkboxes - trouble In reply to
Sly Cornball...something is hosed and it is almost 9pm on the East Coast. I will come back tomorrow and fuss with it again. I cannot go past 9pm here. Sorry.



thanks for your help!

Tomsweb
Quote Reply
Re: [tomsweb] perl email from checkboxes - trouble In reply to
Hello Tomsweb

I just tried the page on the server and a semi colon appears to be missing at the end of the line 45

as : open(SENDMAIL, "|$sendmailpath") or die "Cannot open $sendmail: $!"; <-- missing

thanks cornball
Quote Reply
Re: [cornball] perl email from checkboxes - trouble In reply to
Cool Cornball, You are the man! Four eyes are often better than 2

Thanks!
Quote Reply
Re: [tomsweb] perl email from checkboxes - trouble In reply to
Blush Cornball,

I just fixed error and reloaded, but trouble remains. 9 pm East Coast time, must sign off til t'morrow. Sorry. If you wanna keep playing on your west coast?, Go Ahead.

I can be contacted at psutom@micro-link.net...

Thanks!

Tomsweb
Quote Reply
Re: [tomsweb] perl email from checkboxes - trouble In reply to
You need to tell us the problem before anyone can help you.