Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formmail is driving me nuts Pllllzzzzz Help

Status
Not open for further replies.

phreerose

Technical User
Jan 12, 2005
8
US
I have sendmail and I'm using formmail through my server. I wrote my code, ftp'd and tested and everything seems to work fine, but the data never gets e-mailed to me please help!!! Here's the code..


<xmp>
<form name="form1" method="post" action=" <p>

<input name="recipient" type="hidden" value="marketing@selfhelp.net">

Simply fill in your name, e-mail address, and
areas of interest below and we'll do the rest.<br>
<br> <input type="text" name="email" value="" size="30"> <div class="SUTableContainer">
<div class="SUrow1Container">
<div class="COL11SU">
<div class="signHolder">* First Name:</div>
<div class="signHolder">* Last Name:</div>
<div class="signHolder">* Email:</div>
</div>
<div class="COL12SU">
<div class="signHolder">
<input class="txtBoxMan" name="FirstName"type="text">
</div>
<div class="signHolder">
<input class="txtBoxMan" name="LastName"type="text">
</div>
<div class="signHolder">
<input class="txtBoxMan" name="Email"type="text">
</div>
</div>
</div>
<div class="SUrow2Container">Area of interests: (Select all that
apply) </div>
<div class="SUrow3Container">
<div class="COL11SULong">
<div class="signHolder">
<input name="Interested in" type="checkbox" value="Senior Source">
Senior Source</div>
<div class="signHolder">
<input name="Interested in" type="checkbox" value="Licensed Home Care">
Licensed&nbsp;Home&nbsp;Care</div>
<div class="signHolder">
<input name="Interested in" type="checkbox" value="Senior Housing">
Senior Housing</div>
<div class="signHolder">
<input name="Interested in" type="checkbox" value="Events"> Events</div>
</div>
<div class="COL12SULong">
<div class="signHolder">
<input name="Interested in" type="checkbox" value="Community Programs">
Community Programs</div>
<div class="signHolder">
<input name="Interested in" type="checkbox" value="Nazi Victim Services">
Nazi&nbsp;Victim&nbsp;Services</div>
<div class="signHolder">
<input name="Interested in" type="checkbox" value="Donate/Volunteer">
Donate/Volunteer</div>
<div class="signHolder">
<input name="Interested in" type="checkbox" value="Senior Activity Centers">
Senior&nbsp;Activity&nbsp;Centers</div>
</div>
</div>
<div class="SUrow2Container">
<div class="signHolder">
<input type="checkbox">
HIV/AIDS&nbsp;Certified&nbsp;Home&nbsp;Care</div>
</div>
<div class="SUrow2Container">
<div class="btnHolder">
<input type="submit" class="submit-button"value="Submit" onClick="return validate();"><input type=hidden name="redirect" value="
</div>
</div>
<div class="SUrow3Container"><div class="lineHeightText">We take your privacy very seriously
and will never pass your details on to any third party. Every
email you receive from us will contain instructions on how to
unsubscribe. For more information please view our <a href="privacy.shtm" target="_top"><span class="linkAU">Privacy
Policy</span></a></div></div>
</div>
</form> </xmp>






Back to top


ATNO/TW
Super Moderator



Joined: 28 May 2003
Location: Pittsburgh PA

Status: Online
Posts: 10449
Posted: Tue Mar 15, 2005 6:23 am Post subject:

--------------------------------------------------------------------------------

At a quick glance it looks like your form is OK.

Have you verified your path to perl and your mail path are correct? The most common reason I know of for your problem is the mail path is wrong. Here's from Matt's own instructions:






Sign up Now! Time is running out.


Back to top


agrotzky
Born



Joined: 14 Mar 2005


Status: Online
Posts: 3
Posted: Tue Mar 15, 2005 8:07 am Post subject:

--------------------------------------------------------------------------------

Yep this is what tech support sent me

The following is the send mail script you requested:

Sendmail: /usr/lib/sendmail
$ mail prog: '/usr/lib/sendmail-i-t';

I tried both and still no good
 
Form looks OK - did u ammend the formmail script as matt says?

I did have problems myself when i first used the script - it just wouldn't do anything - i solved my problems by changing it from .pl to .cgi extension.

Also do u get error logs from your host - this could tell you where it is going wrong.
 
Yep changed the formmail.log script see below

# 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/lib/sendmail-i-t';


# ADDED BY RAR
# $tempdir defines the location of the temporary directory to which the #
# Web Server user must have read and write access. If you are running on #
# NTFS, this is especially important.
$tempdir = 'd:\216.247.8.112\cgi-bin';

# ADDED BY RAR
# $logfile defines the location of the logfile. Logging does not cover errors#
# such as sendmail excecution permissions errors. Logs also contain sender, #
# receipient, and subject information, so log files may get big fast! You can#
# turn off logging by setting $uselog = 0; #
$uselog = 1; # 1 = Yes; 0 = No
$logfile = 'd:\216.247.8.112\cgi-bin\formmail.log';

# @referers allows forms to be located only on servers which are defined #
# in this field. This security fix from the last version which allowed #
# anyone on any server to use your FormMail script on their web site. #
# REFERERS SUCH AS AOL.COM, YAHOO.COM, HOTMAIL.COM WILL BE AUTOMATICALLY #
# REMOVED. SEE FAQ AT SCRIPTARCHIVE.COM ABOUT @recipients #
@referers = ('216.247.8.112', 'selfhelp.net', '
# @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 = ('marketing\@selfhelp\.net');

# ACCESS CONTROL FIX: Peter D. Thompson Yezek #
# @valid_ENV allows the sysadmin to define what environment variables can #
# be reported via the env_report directive. This was implemented to fix #
# the problem reported at #

@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');

# Done
 
Also check the log, I can't make heads or tails of the info here it is.. Seems like it's working just don't get why I'm not getting the e-mail

================================================================================
66.144.166.38- [Monday, March 14, 2005 at 12:40:42] - Successful
================================================================================
Recipient: marketing@mysite.net
Subject: ertsd
Sender: marketing@mysite.net(me)

Mailer Output:
--------------------------------------------------------------------------------

Stalkerlab's SMTP Mailer V1.20

Local Host: ipswow0001atl2

Looking up for mail gateway...
Remote Host Name: mailhub.registeredsite.com
IP Address: 64.224.219.120

Connected to remote SMTP port:
220 mailhub.atl.registeredsite.com ESMTP SMTP Service (NO SPAM/UCE)

Sending HELO ipswow0001atl2...
250 mail5.atl.registeredsite.com Hello ipswow0001atl2.public.registeredsite.com [216.247.74.13], pleased to meet you

Sending MAIL FROM: <marketing@mysite.net>...
250 2.1.0 <marketing@mysite.net>... Sender ok

Sending RCPT TO: <marketing@mysite.net>...
250 2.1.5 <marketing@mysite.net>... Recipient ok

Sending DATA...
354 Enter mail, end with "." on a line by itself

OK, let's go to send the mail, now...
250 2.0.0 j2EHehLa003326 Message accepted for delivery

Sending QUIT...
221 2.0.0 mail5.atl.registeredsite.com closing connection

Mail sent
Connection closed
Program terminated
================================================================================
================================================================================
66.144.166.38- [Monday, March 14, 2005 at 12:46:42] - Successful
================================================================================
Recipient: marketing@mysite.net
Subject:
Sender: ()

Mailer Output:
--------------------------------------------------------------------------------
================================================================================
================================================================================
66.144.166.38- [Monday, March 14, 2005 at 12:47:27] - Successful
================================================================================
Recipient: marketing@mysite.net
Subject:
Sender: ()

Mailer Output:
--------------------------------------------------------------------------------
================================================================================
================================================================================
66.144.166.38- [Monday, March 14, 2005 at 15:50:37] - Successful
================================================================================
Recipient: marketing@mysite.net
Subject:
Sender: ()

Mailer Output:
--------------------------------------------------------------------------------
================================================================================
================================================================================
66.144.166.38- [Monday, March 14, 2005 at 15:56:08] - Successful
================================================================================
Recipient: marketing@mysite.net
Subject:
Sender: ()

Mailer Output:
--------------------------------------------------------------------------------
================================================================================
================================================================================
66.144.166.38- [Monday, March 14, 2005 at 16:00:01] - Successful
================================================================================
Recipient: marketing@mysite.net
Subject:
Sender: s23d()

Mailer Output:
--------------------------------------------------------------------------------
================================================================================
================================================================================
66.144.166.38- [Monday, March 14, 2005 at 16:06:16] - Successful
================================================================================
Recipient: marketing@mysite.net
Subject:
Sender: ()

Mailer Output:
--------------------------------------------------------------------------------
================================================================================
================================================================================
66.144.166.38- [Tuesday, March 15, 2005 at 11:47:39] - Successful
================================================================================
Recipient: marketing@mysite.net
Subject:
Sender: dghdf()

Mailer Output:
--------------------------------------------------------------------------------
================================================================================
 
looking at that it seems that you are sending the mail to marketing@mysite.net and not marketing@selfhelp.net or have you ammended the output yourself
 
ammended for security but I obviouly missed one
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top