webForumDet fria alternativet

Mail-formulär

1 svar · 341 visningar · startad av Inviso

InvisoMedlem sedan juni 20031 inlägg
#1

Halloj!
Jag håller på att trilla isär av frustration... :x jag har ingen erfarenhet av cgi-bin och mailformulär, men måste få till det. Jag har hämtat ett script som jag nedan saxar ur det jag ska ändra på men inte fattar/får till så det funkar...

____________________________________________
/usr/bin/perl
#change first line to proper perl location.

###########################################
#Very simple formmail script.
#Script send datas like ip number and remote host.
#Also after posting details it thanks user for posting.
#When user open formmail.cgi in browser directly it says error as well.
#To use it simple upload it to your directory and chmod to 755.(by any ftp program).
#After this simple make any form (html page) and forward to this script.
#Do not forget to change details like your mail, url(in thank.htm) and thank_you_page(if you have changed path).
#If you have problems you can contact webmaster@dony.com.kg
#This script is free of charge. Do not hesitate to suggest this script to your friends.
#Thanks for using this script.
#https://www.dony.com.kg
###########################################

print "Content-type:text/html\n\n";

#enter your personal data

$mail='kontakt@inviso.se'; #Write your mail here.
$mailprog='/usr/lib/sendmail'; #Change this to your sendmail path.
$thank_you_page="tack.html"; #Change location of thank you page.(if it is in other directory)

#nothing else to change. leave this section as it is.
_________________________________________

Jag ändrar och ändrar, men fattar inte varför det inte funkar. x( Nån som kan hjälpa mig att få till detta eller har tips om något annat som funkar istället?

Tack på förhand!

JojoxxMedlem sedan juni 20004 308 inlägg
#2

"Shebangen" i början av scriptet är fel. Om sökvägen till perl är "/usr/bin/perl " skall första raden i scriptet lyda:

#!/usr/bin/perl

... för att det skall fungera. Lägg alltså till "#!" först.

136 ms totalt · 3 externa anrop · v20260731065814-full.3ab8d573
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
133 ms — hämta tråd, inlägg och bilagor (db)