Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Syntax for running formmail.pl from a Dreamweaver 8 website form

New Here ,
Oct 08, 2009 Oct 08, 2009

Hi,

I setup a form in Dreamweaver 8 so users could email me contact information--however I can't seem to get the script

to run.  Looking on the web, it was recommended to use a perl script called formmail.pl

My web hosting is with yahoo.  Their website says they support perl, and there is no cgi bin needed to be

referenced.  Below is the instruction they gave.

The path to Perl is /usr/bin/perl.

Perl scripts generally start with a "Perl directive," or the path to Perl. The web server's operating system reads the beginning of every script and looks for this directive, which looks like this:

#!/usr/bin/perl

We strongly recommend that you use this directive on the first line of all Perl scripts. The directive is required to pass parameters to Perl such as –w (or "warning"), which will add additional details to your log file to help you troubleshoot your scripts. Here is an example of a Perl directive with -w:

#!/usr/bin/perl -w

The Perl directive also allows your script to run in most server environments, ensuring portability should you need to reuse your scripts on another site.

My question is, what is the syntax within the form action field to execute this script? I though it was http://websitename.com/usr/bin/perl/formmail.pl however I get a page not found error when I click the submit button.

Any help would greatly be appreciated!

Thanks!

TOPICS
Server side applications
757
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 08, 2009 Oct 08, 2009

I cannot help you with the Perl language, but path to Perl has nothing to do with your email scripts. It just says where to find Perl in the server.

You should create an email execution page in Perl, e.g.  http://websitename.com/scripts/formmailexec.pl and put the address in your action field.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 10, 2009 Oct 10, 2009
LATEST

Thanks for your response, I am a little further along, however I'm getting the following error message.

Error: Bad/No Recipient
There was no recipient or an invalid recipient specified in the data sent to FormMail. Please make sure you have filled in the recipient form field with an e-mail address that has been configured in @recipients. More information on filling in recipient form fields and variables can be found in the README file.

I don't understand why I'm getting this--I have put in my email address in the Perl script.  See bold red

below.

Thanks.

#!/usr/bin/perl
##############################################################################
# FormMail                        Version 1.93                               #
# Copyright 1995-2009 Matt Wright mattw@scriptarchive.com                    #
# Created 1995-06-09              Last Modified 2009-07-14                   #
# Matt's Script Archive, Inc.:    http://www.scriptarchive.com/              #
##############################################################################
# COPYRIGHT NOTICE                                                           #
# Copyright 1995-2009 Matthew M. Wright  All Rights Reserved.                #
#                                                                            #
# FormMail may be used and modified free of charge by anyone so long as this #
# copyright notice and the comments above remain intact.  By using this      #
# code you agree to indemnify Matthew M. Wright from any liability that      #
# might arise from its use.                                                  #
#                                                                            #
# Selling the code for this program without prior written consent is         #
# expressly forbidden.  In other words, please ask first before you try and  #
# make money off of my program.                                              #
#                                                                            #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact. #
##############################################################################
# ACCESS CONTROL FIX: Peter D. Thompson Yezek                                #
# XSS + REDIRECT FIX: Francesco Ongaro, Giovanni Pellerano & Antonio Parata  #
#   v1.93             http://www.ush.it/team/ush/hack-formmail_192/adv.txt   #
##############################################################################
# Define Variables                                                           #
#      Detailed Information Found In README File.                            #

# $mailprog defines the location of your sendmail program on your unix       #
# system. The flags -i and -t should be passed to sendmail in order to       #
# have it ignore single dots on a line and to read message for recipients    #

$mailprog = '/usr/sbin/sendmail -i -t';

# @referers allows forms to be located only on servers which are defined     #
# in this field.  This is a security fix to prevent others from using your   #
# FormMail script on their web site.                                         #

@referers = ('chicconceptstexas.com','72.52.156.109');

# @recipients defines the e-mail addresses or domain names that e-mail can   #
# be sent to.  This must be filled in correctly to prevent SPAM and allow    #
# valid addresses to receive e-mail.  Read the documentation to find out how #
# this variable works!!!  It is EXTREMELY IMPORTANT.                         #
@recipients = &fill_recipients('bcm2007@hotmail.com');

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines