webForumDet fria alternativet

Formmail

22 svar · 737 visningar · startad av Fenmund

FenmundMedlem sedan maj 200462 inlägg
#1

Hej!

Försöker få till mitt formmail men hajar bara inte var problemet är,
Jag har skapat en enkel sida med formuläret på men när man trycker på skicka knappen så står det bara att servern inte hittades.
Ni hittar scriptet på http://www.tvattkorgen.se/bestform.htm

Vore tacksam om någon duktig så nåt fel i koden!

Tack

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Beställningsformulär Tvättkorgen</title>
</head>

<body>

<form method="post" action="http://www.tvattkorget.se/cgi-bin/FormMail.pl">
<input type=hidden name="recipients" value="johannordstrand@hotmail.com">
<input type=hidden name="subject" value="Order till Tvättkorgen">
<input type=hidden name="redirect" value="http://www.tvattkorgen.se/tack_for_bestallning.htm">
<input type=hidden name="required" value="email, namn, adress, postanummer, ort, villkor">

<p>
<input name="personuppgifter" Size="35" value="Låt oss börja med lite uppgifter om dig" disabled>
</p>

<p>
<input type="text" name="Namn" Size="35"> - Namn*<br>
<input type="text" name="email" Size="35"> - E-post*<br>
<input type="text" name="adress" Size="35"> - Adress*<br>
<input type="text" name="postnummer" Size="5"> <input type="text name="ort" Size="15">
- Postadress*<br>
<input type="text" name="telefon" Size="35"> - Telefon
</p>
<p>  </p>

<input name="Vad vill du bestalla" Size="35" value="Vad vill du beställa?" disabled> <br>
<br>
<select name="Artikel 1">
<option selected> -- Artikel 1 -- </option>
<option> Tröja 1 </option>
<option> Tröja 2 </option>
<option> Tröja 3 </option>
</select>

<select name="Storlek artikel 1">
<option selected> -- Välj storlek -- </option>
<option> Small </option>
<option> Medium </option>
<option> Large </option>

</select>

 
<p>

<select name="Artikel 2">
<option selected> -- Artikel 2 -- </option>
<option> Tröja 1 </option>
<option> Tröja 2 </option>
<option> Tröja 3 </option>
</select>

<select name="Storlek artikel 2">
<option selected> -- Välj storlek -- </option>
<option> Small </option>
<option> Medium </option>
<option> Large </option>

</select>

 </p>
<p>

<select name="Artikel 3">
<option selected> -- Artikel 3 -- </option>
<option> Tröja 1 </option>
<option> Tröja 2 </option>
<option> Tröja 3 </option>
</select>

<select name="Storlek artikel 3">
<option selected> -- Välj storlek -- </option>
<option> Small </option>
<option> Medium </option>
<option> Large </option>

</select><br>
<br>
<br>
Hur hittade du hit?<br>
<select name="Hur hittade du hit?">
<option selected>-- Välj Här -- </option>
<option>Sökmotor</option>
<option>Via en bekant</option>
<option>Via länk på annan sida</option>
<option>Annons</option>
<option> Annat sätt</option>

</select>

</p>

<p>
<input type="radio" name="villkor" value="villkor"><font size="2">Jag
har läst och godkänner Tvättkorgens Villkor </font><br>
<input type="submit" name="Skicka" value="Skicka beställningen!">
<input type="reset" name="rensa" value=Rensa formuläret...">

</p>

</form>

</body>

</html>
</form>
</form>

magnusfernstromMedlem sedan mars 20032 184 inlägg
#2

1. Använd kod-taggen när du postar kod.
2. Du postar endast HTML-koden. Jag betvivlar att det är där felet ligger.

:)

FenmundMedlem sedan maj 200462 inlägg
#3

Ok sorry jag är grön (men lär mig fort)

Vart kan felet annars ligga?
Är det kanske så att man ska ändra något i formmail.pl???

magnusfernstromMedlem sedan mars 20032 184 inlägg
#4

Snälla. Ursäkta dig inte, alla är vi nybörjare. :bire

Eftersom datan som skickas med formuläret tas emot på sidan FormMail.pl måste det vara något fel där. Fel i HTML-koden resulterar aldrig i felsidor.

Posta koden i FormMail.pl, så kommer nog många hjälpa dig. :)

FenmundMedlem sedan maj 200462 inlägg
#5

OK,

kanon! Tack för hjälpen,
Jag trodde att det bara va ett program som jag la in på servern och vips - så ska det funka...men, men

magnusfernstromMedlem sedan mars 20032 184 inlägg
#6

Nja. Det är som sagt koden i FormMail.pl det är fel på.

Posta den. :)

FenmundMedlem sedan maj 200462 inlägg
#7

Kod Formmail.pl

Hejsan!

Jag har en kod här från formmail.pl men får den inte att fungera, vore toppen om nån ser nåt fel...får mig är detta bara en stor j**la röra med tecken och siffrar :-)

Jag har blivit tvungen att ta bort lite i koden då den va för lång....

[kod]

: text/html

<html>
<head>
<title>Bad Referrer - Access Denied</title>
</head>
<body bgcolor=#FFFFFF text=#000000>
<center>
<table border=0 width=600 bgcolor=#9C9C9C>
<tr><th><font size=+2>Bad Referrer - Access Denied</font></th></tr>
</table>
<table border=0 width=600 bgcolor=#CFCFCF>
<tr><td>The form attempting to use
<a href="http://www.scriptarchive.com/formmail.html">FormMail</a>
resides at <tt>$referer</tt>, which is not allowed to access
this cgi script.<p>

 If you are attempting to configure FormMail to run with this form, you need
 to add the following to \\@referers, explained in detail in the 
 \<a href="http://www.scriptarchive.com/readme/formmail.html"\>README\</a\> file.\<p\>

 Add \<tt\>'$host'\</tt\> to your \<tt\>\<b\>\\@referers\</b\>\</tt\> array.\<hr size=1\>
 \<center\>\<font size=-1\>
  \<a href="http://www.scriptarchive.com/formmail.html"\>FormMail\</a\> V1.92 &copy; 1995 - 2002  Matt Wright\<br\>
  A Free Product of \<a href="http://www.scriptarchive.com/"\>Matt's Script Archive, Inc.\</a\>
 \</font\>\</center\>
\</td\>\</tr\>

</table>
</center>
</body>
</html>
(END ERROR HTML)
}
else {
print <<"(END ERROR HTML)";
Content-type: text/html

<html>
<head>
<title>FormMail v1.92</title>
</head>
<body bgcolor=#FFFFFF text=#000000>
<center>
<table border=0 width=600 bgcolor=#9C9C9C>
<tr><th><font size=+2>FormMail</font></th></tr>
</table>
<table border=0 width=600 bgcolor=#CFCFCF>
<tr><th><tt><font size=+1>Copyright 1995 - 2002 Matt Wright<br>
Version 1.92 - Released April 21, 2002<br>
A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive,
Inc.</a></font></tt></th></tr>
</table>
</center>
</body>
</html>
(END ERROR HTML)
}
}

elsif ($error eq 'request_method') {
        print \<\<"(END ERROR HTML)";

Content-type: text/html

<html>
<head>
<title>Error: Request Method</title>
</head>
<body bgcolor=#FFFFFF text=#000000>
<center>
<table border=0 width=600 bgcolor=#9C9C9C>
<tr><th><font size=+2>Error: Request Method</font></th></tr>
</table>
<table border=0 width=600 bgcolor=#CFCFCF>
<tr><td>The Request Method of the Form you submitted did not match
either <tt>GET</tt> or <tt>POST</tt>. Please check the form and make sure the
<tt>method=</tt> statement is in upper case and matches <tt>GET</tt> or <tt>POST</tt>.<p>

 \<center\>\<font size=-1\>
  \<a href="http://www.scriptarchive.com/formmail.html"\>FormMail\</a\> V1.92 &copy; 1995 - 2002  Matt Wright\<br\>
  A Free Product of \<a href="http://www.scriptarchive.com/"\>Matt's Script Archive, Inc.\</a\>
 \</font\>\</center\>
\</td\>\</tr\>

</table>
</center>
</body>
</html>
(END ERROR HTML)
}

elsif ($error eq 'no_recipient') {
        print \<\<"(END ERROR HTML)";

Content-type: text/html

<html>
<head>
<title>Error: Bad/No Recipient</title>
</head>
<body bgcolor=#FFFFFF text=#000000>
<center>
<table border=0 width=600 bgcolor=#9C9C9C>
<tr><th><font size=+2>Error: Bad/No Recipient</font></th></tr>
</table>
<table border=0 width=600 bgcolor=#CFCFCF>
<tr><td>There was no recipient or an invalid recipient specified in the data sent to FormMail. Please
make sure you have filled in the <tt>recipient</tt> form field with an e-mail
address that has been configured in <tt>\@recipients</tt>. More information on filling in <tt>recipient</tt> form fields and variables can be
found in the <a href="http://www.scriptarchive.com/readme/formmail.html">README</a> file.<hr size=1>

 \<center\>\<font size=-1\>
  \<a href="http://www.scriptarchive.com/formmail.html"\>FormMail\</a\> V1.92 &copy; 1995 - 2002  Matt Wright\<br\>
  A Free Product of \<a href="http://www.scriptarchive.com/"\>Matt's Script Archive, Inc.\</a\>
 \</font\>\</center\>
\</td\>\</tr\>

</table>
</center>
</body>
</html>
(END ERROR HTML)
}

elsif ($error eq 'invalid_headers') {
        print \<\<"(END ERROR HTML)";

Content-type: text/html

<html>
<head>
<title>Error: Bad Header Fields</title>
</head>
<body bgcolor=#FFFFFF text=#000000>
<center>
<table border=0 width=600 bgcolor=#9C9C9C>
<tr><th><font size=+2>Error: Bad Header Fields</font></th></tr>
</table>
<table border=0 width=600 bgcolor=#CFCFCF>
<tr><td>The header fields, which include <tt>recipient</tt>, <tt>email</tt>, <tt>realname</tt> and <tt>subject</tt> were
filled in with invalid values. You may not include any newline characters in these parameters.
More information on filling in these form fields and variables can be
found in the <a href="http://www.scriptarchive.com/readme/formmail.html">README</a> file.<hr size=1>

 \<center\>\<font size=-1\>
  \<a href="http://www.scriptarchive.com/formmail.html"\>FormMail\</a\> V1.92 &copy; 1995 - 2002  Matt Wright\<br\>
  A Free Product of \<a href="http://www.scriptarchive.com/"\>Matt's Script Archive, Inc.\</a\>
 \</font\>\</center\>
\</td\>\</tr\>

</table>
</center>
</body>
</html>
(END ERROR HTML)
}

elsif ($error eq 'missing_fields') {
    if ($Config{'missing_fields_redirect'}) {
        print "Location: " . &clean_html($Config{'missing_fields_redirect'}) . "\\n\\n";
    }
    else {
        foreach $missing_field (@error_fields) {
            $missing_field_list .= "\<li\>" . &clean_html($missing_field) . "\\n";
        }

        print \<\<"(END ERROR HTML)";

Content-type: text/html

<html>
<head>
<title>Error: Blank Fields</title>
</head>
<center>
<table border=0 width=600 bgcolor=#9C9C9C>
<tr><th><font size=+2>Error: Blank Fields</font></th></tr>
</table>
<table border=0 width=600 bgcolor=#CFCFCF>
<tr><td>The following fields were left blank in your submission form:<p>
<ul>
$missing_field_list
</ul><br>

 These fields must be filled in before you can successfully submit the form.\<p\>
 Please use your browser's back button to return to the form and try again.\<hr size=1\>
 \<center\>\<font size=-1\>
  \<a href="http://www.scriptarchive.com/formmail.html"\>FormMail\</a\> V1.92 &copy; 1995 - 2002  Matt Wright\<br\>
  A Free Product of \<a href="http://www.scriptarchive.com/"\>Matt's Script Archive, Inc.\</a\>
 \</font\>\</center\>
\</td\>\</tr\>

</table>
</center>
</body>
</html>
(END ERROR HTML)
}
}

exit;

}

[kod]

Ha det så bra i solen!

magnusfernstromMedlem sedan mars 20032 184 inlägg
#8

/red

Såg nu att du hade gjort det, dock måste du avsluta kodtaggen med ett /. :)

FenmundMedlem sedan maj 200462 inlägg
#9

TYPISKT!

allt ska det vara nåt *s*

magnusfernstromMedlem sedan mars 20032 184 inlägg
#10

Du avslutar det med ett snedstreck, som sagt.

[ /kod] utan mellanslag.

Det är jobbigt att läsa den annars.

HansenMedlem sedan aug. 2000383 inlägg
#11

Jag skulle gissa på att du har ett typo i form elementets attribut action:

<form method="post" action="http://www.tvattkorget.se/cgi-bin/FormMail.pl">

Ska nog vara:

<form method="post" action="http://www.tvattkorgen.se/cgi-bin/FormMail.pl">
FenmundMedlem sedan maj 200462 inlägg
#12

Nä, va fånigt!

Nu får jag i alla fall upp nåt annat felmeddelande...det går framåt!

Tack för att ni tar er tid...det uppskattas verkligen!

FenmundMedlem sedan maj 200462 inlägg
#13

Hej igen!
Jag får nu upp denna text:

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
---------------------------------------
och har gjort följande inställning

# @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(order@tvattkorgen.se);

# 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 [url]http://www.securityfocus.com/bid/1187[/url]              #

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

Jag har också sett till så att det är samma e-post adress som i formuläret....

någon idé?

HansenMedlem sedan aug. 2000383 inlägg
#14

Fenmund skrev:

Hej igen!
Jag får nu upp denna text:

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

[...]

någon idé?

Se README för exempel.

Testa med att ändra:

@recipients = &fill_recipients(order@tvattkorgen.se);

Till:

@recipients = &fill_recipients('order@tvattkorgen.se');
FenmundMedlem sedan maj 200462 inlägg
#15

Tack för tipsen...men tyvärr så får jag fortfarande upp felmeddelandet.....*suck*

JojoxxMedlem sedan juni 20004 306 inlägg
#16
@recipients = &fill_recipients('johannordstrand@hotmail.com');

eftersom

<input type=hidden name="recipients" value="johannordstrand@hotmail.com">

eller vice versa :)

FenmundMedlem sedan maj 200462 inlägg
#17

Just nu har jag:

<form method="post" action="http://www.tvattkorgen.se/cgi-bin/FormMail.pl">
<input type=hidden name="recipients" value="order@tvattkorgen.se">
<input type=hidden name="subject" value="Order till Tvättkorgen">
<input type=hidden name="redirect" value="http://www.tvattkorgen.se/tack_for_bestallning.htm">
<input type=hidden name="required" value="email, namn, adress, postanummer, ort, villkor">

i HTML koden

och

# @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('order@tvattkorgen.se');

i formmail.pl

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

HJÄLP! Jag står stilla
:(

GunnarDMedlem sedan juni 20014 250 inlägg
#18
  1. se till så att du har senaste versionen av FormMail..pl tidigare versioner kan enkelt användas av spammare.

  2. Du måste sätta @referers variabeln till din domän ha också med ip-adressen på din webserver.

  3. Du kan endast skicka till dom domäner som finns i @recipients.

Sätter du dessa så skall det fungera, se också till att du har rätt väg till sendmail.

Prova följande:

@referers = ('tvattkorgen.se','192.168.0.1');
.
.
.
@recipients = &fill_recipients('tvattkorgen.se');

Ändra 192.168.0.1 til ip-adressen som din webserver har.

FenmundMedlem sedan maj 200462 inlägg
#19

Tack ni som försöker hjälpa!!!

Tack det hade jag inte gjort.....men tror ni det funkar.....ICKE!

##############################################################################
# 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';

# @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 = ('tvattkorgen.se','217.208.96.74');

# @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('tvattkorgen.se');

# 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 [url]http://www.securityfocus.com/bid/1187[/url]              #

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

# Done                                                                       #
##############################################################################

och

<form method="post" action="http://www.tvattkorgen.se/cgi-bin/FormMail.pl">
<input type=hidden name="recipients" value="order@tvattkorgen.se">
<input type=hidden name="subject" value="Order till Tvättkorgen">
<input type=hidden name="redirect" value="http://www.tvattkorgen.se/tack_for_bestallning.htm">
<input type=hidden name="required" value="email, namn, adress, postanummer, ort, villkor">

<p>
<input name="personuppgifter" Size="35"  value="Låt oss börja med lite uppgifter om dig" disabled>
</p>

<p>
<input type="text" name="Namn" Size="35">   - Namn*<br>
<input type="text" name="email" Size="35"> - E-post*<br>
<input type="text" name="adress" Size="35"> - Adress*<br>
<input type="text" name="postnummer" Size="5"> <input type="text name="ort" Size="15"> 
- Postadress*<br>
<input type="text" name="telefon" Size="35">  - Telefon
</p>
<p> &nbsp;</p>

<input name="Vad vill du bestalla" Size="35"  value="Vad vill du beställa?" disabled> <br>
 <br>
<select name="Artikel 1">
<option selected> -- Artikel 1 -- </option>
<option> Tröja 1 </option>
<option> Tröja 2 </option>
<option> Tröja 3 </option>
</select>

<select name="Storlek artikel 1">
<option selected> -- Välj storlek -- </option>
<option> Small </option>
<option> Medium </option>
<option> Large </option>

</select>

&nbsp;
<p>

<select name="Artikel 2">
<option selected> -- Artikel 2 -- </option>
<option> Tröja 1 </option>
<option> Tröja 2 </option>
<option> Tröja 3 </option>
</select>

<select name="Storlek artikel 2">
<option selected> -- Välj storlek -- </option>
<option> Small </option>
<option> Medium </option>
<option> Large </option>

</select>

&nbsp;</p>
<p>

<select name="Artikel 3">
<option selected> -- Artikel 3 -- </option>
<option> Tröja 1 </option>
<option> Tröja 2 </option>
<option> Tröja 3 </option>
</select>

<select name="Storlek artikel 3">
<option selected> -- Välj storlek -- </option>
<option> Small </option>
<option> Medium </option>
<option> Large </option>

</select><br>
<br>
<br>
 Hur hittade du hit?<br>
<select name="Hur hittade du hit?">
<option selected>-- Välj Här -- </option>
<option>Sökmotor</option>
<option>Via en bekant</option>
<option>Via länk på annan sida</option>
<option>Annons</option>
<option> Annat sätt</option>

</select>

</p>

<p>
<input type="radio" name="villkor" value="villkor"><font size="2">Jag
har läst och godkänner Tvättkorgens Villkor </font><br>
<input type="submit" name="Skicka" value="Skicka beställningen!">
<input type="reset" name="rensa" value=Rensa formuläret...">
</p>
</form>

Jag börjar bli lite trött på det här nu *skrattar*

****Tack ni försöker hjälpa****

HansenMedlem sedan aug. 2000383 inlägg
#20

Re: Tack ni som försöker hjälpa!!!

Fenmund skrev:

[...]

<input type=hidden name="recipients" value="order@tvattkorgen.se">

Typo? Du menar nog:

<input type=hidden name="recipient" value="order@tvattkorgen.se">
Genererad på 385 ms · cache AV · v20260730165559-full.f96bc7eb