formail + email

P

paul

Can anyone review the following procedure and see what I have done wrong?

I downloaded FormMail.pl ver 1.92 from scriptarchive .com a few days ago
and have read all the help files, but cannot get it working. I am using
FrontPage 2003 and have created a Newsletter Subscription Form (called
newsletter.htm) a test Website (called mydomain.com).

The problem is:
When I run a test on the newsletter subscription form, by inputting my name
and email address in the text fields, and then clicking the "Submit" button,
an email does not arrive at the webmail address (e-mail address removed).

I may not have set the "Properties Box" settings correctly for the "Name",
"Email", and "Submit" button fields. (I can send a virus scanned, Screen
Capture, of the "Submit" button property boxes, and html code, in a word
document if you can help). Else if you could send me screen capture of how to
set the submit button or written description of how to do it for the setup I
am trying to create - it would be greatly appreciated.

If this is not the cause of the problem then it may lay with the way I have
configured FormMail.cgi, the details of which are below.

Procedures I followed:
1. When I received FormMail.pl I changed the file name to FormMail.cgi, as
recommened in the help files.
2. I changed the following variables in the FormMail script as follows:
a) Perl Interpreter 1st line of script /usr/bin/perl Did Not Need
Changing
b) $mailprog = '/usr/bin/sendmail -i -t'; Changed /lib/ To
/bin/
c) @referers = ('mydomain.com','117.0.24.201'); Added My Domain and
Web Server IP Address Where Webmail is Located.
d) @valid_ENV = ('REMOTE_HOST','REMOTE
ADDR','REMOTE_USER','HTTP_USER_AGENT','HTTP_REFERER'); Unchanged
e) @recipients = &fill_recipients(@referers); Unchanged

3. I was'nt sure what to do as far as the FormMail "Form Configuration" was
concerned, but placed the following highlited code
<input type=hidden name="recipient" value="email@[email protected]">
at the bottom of newsletter.htm just above the 2nd body tag below.

</body>
Sign Up Now! It's Free... </b></font></p>

<form onsubmit="return NLValidateForm()" method="POST"
action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" S-Email-Address="(e-mail address removed)"
S-Email-Format="TEXT/PRE" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE"
B-Email-Label-Fields="TRUE" S-Date-Format="%d/%m/%Y" S-Time-Format="%I:%M:%S
%p" S-Builtin-Fields="REMOTE_NAME REMOTE_USER HTTP_USER_AGENT Date Time" -->
<p align="center"><font face="Arial"><b>Enter your Details<br>
<font size="2">Name: </font><a href="mailto:[email protected]">
<input name="Newsletter_Request" size="30"></a><br>
<font size="2">Email:</font> <a href="mailto:[email protected]">
<input type="text" name="Newsletter_Request" size="30"></a><br>

<a href="mailto:[email protected]?subject=Newsletter Request">
<input type="submit" name="Newletter_Request" style="font-size: 10pt;
font-family: Arial; color: #000000; font-weight: bold; border: 2px solid
#000000; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px"></a><br>
<input type=hidden name="recipient" value="(e-mail address removed)">
<font size="1"> </font></b><font size="1"><strong><u>Note</u>:
<font color="#B91806">We respect your privacy. We won't give away, sell,
share

<input type=hidden name="recipient" value="email@[email protected]">

</body>

4. After making the above changes I uploaded the ammended FormMail.cgi, and
newsletter.htm files, to the public_html directory at the website.
5. I don't know if this is a clue to the problem, but when I clicked the
submit buttom a new webpage appears with
http://www.mydomain.com/--WEBBOT-SELF-- in the address bar.

I don't know anyone that could help me with this problem and would be most
grateful for any assistance.
Thanking you kindly.
regards,
Paul
 
R

Ronx

Not sure about the rest of the configuration, but
<form onsubmit="return NLValidateForm()" method="POST"
action="--WEBBOT-SELF--">

needs to be changed to

<form onsubmit="return NLValidateForm()" method="POST"
action="cgi-bin\formMail.cgi">

this assumes that the formMail.cgi has been loaded into the cgi-bin
folder - change the path as necessary. If on Unix server, also use a
FTP program (or your website control panel) to CHMOD the file to 755.

In the form also delete all instances of <a
href="mailto:[email protected]"> (including the one with the
?subject= in it).
These links will open the users email client, and avoid using your form.

<input type=hidden name="recipient"
value="email@[email protected]"> should also be deleted. You
have this with correct syntax earlier in the form.
Having this field in the form will open the door to spammers.
formMail.cgi can be configured to have the email address hard coded in
the script, where spammers cannot see it.


--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp
 
P

paul

Hi Ronx,
Thank you for your detailed reply! I followed all your instructions which
were easy to follow, but when I tested the form (by inputting a name and
email address the webpage went to www.mydomain.com/cgi-bin/FormMail.cgi -
which displkayed a message saying "Page Not Found" in the address bar).

So, I still have a problem!!

The way I have configured the FormMail script is as follows:
a) Perl Interpreter 1st line of script /usr/bin/perl Did Not Need
Changing
b) $mailprog = '/usr/bin/sendmail -i -t'; Changed /lib/ To
/bin/
c) @referers = ('mydomain.com','134.0.24.201'); Added My Domain and
Web Server IP
Address Where Webmail is Located.
d) @valid_ENV = ('REMOTE_HOST','REMOTE
ADDR','REMOTE_USER','HTTP_USER_AGENT','HTTP_REFERER'); Unchanged
e) @recipients = &fill_recipients('^newsletter\@mydomain\.com');
Changed

The settings in the "Submit" button, "Form Properties Box", have been
changed to:
*Send To Other
and in the "Advanced" box, contains nothing. "The recipient value is no
longer there."
and the "Options" box contains, "Action" = cgi-bin/formMail.cgi
"Method" = POST

Is there something wrong with how this is configured??

The html code for the form now contains:
<form onsubmit="return NLValidateForm()" method="POST"
action="cgi-bin\formMail.cgi">
<p align="center"><font face="Arial"><b>Enter your Details<br>
<font size="2">Name: </font>
<input name="Newsletter_Request" size="30"></a><br>
<font size="2">Email:</font>
<input type="text" name="Newsletter_Request" size="30"></a><br>

<input type="submit" name="Newletter_Request" style="font-size: 10pt;

After making your suggested changes I uploaded the ammended FormMail.cgi,
and newsletter.htm files, to the public_html/cgi-bin/formMail.cgi directory
at the website.

If any one can help I would be most grateful, I feel I am so close.
Thanks kindly.
regards,
Paul
 
R

Ronx

At first glance I would say you have a CaSe problem.
Unix servers are CaSe sensitive - formMail.cgi, FormMail.cgi and
formmmail.cgi are 3 different files: ALL references to the file must be
identical.
If the file was uploaded as formMail.cgi, then the form tag must have
action="cgi-bin/formMail.cgi".

Further, there is a path problem - since you uploaded the formpage.htm
into the cgi-bin, the form is now looking for
http://www.example.com/cgi-bin/cgi-bin/FormMail.cgi.

The form page should be in the root folder, (same folder as your home
page).

Move the form page to the root folder, and check the form tag so the
action attribute is pointing to the correct path and file - if the file
is formMail.cgi, then use action="cgi-bin/formMail.cgi" The case is
important. The cgi script must stay in the cgi-bin.

I have not yet had time to look through my copy of formmail, to check
your configuration - and it's been a very long time since I last used
this script.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top