Formular, via local host
HejJeg er ved at lave en tilmeldingsblanket online, men får hele tiden fejlen: "500 - Internal server error - There is a problem with the resource you are looking for, and it cannot be displayed."
Jeg håber, at der er nogle kloge hoveder herinde, som kan hjælpe mig med at rette nedenstående, således jeg "bare" kan klaske det online.. Jeg skal bruge "local" som afsender, da der ellers er spærret.
tilmeld_aktiv.asp -->
<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
Set JMail = Server.CreateObject("JMail.SMTPMail")
' Angiv din mail server du skal sende mails igennem
JMail.ServerAddress = "local"
'Afsender:
JMail.SenderName = "Tilmelding"
JMail.Sender = "xx@xx.com"
JMail.Subject = "Online tilmelding - hjemmesiden"
JMail.AddRecipient Request.Form("_modtager")
str = "Hej " & vbCrLf & vbCrLf
str = str & "Dette er en online tilmelding, som er blevet afsendt fra hjemmesiden... Beskeden er blevet sendt via formularen på siden: tilmeld_aktiv.asp" & vbCrLF & vbCrLF
str = str & "Generel information:" & vbCrLF
str = str & "Fornavn = " & Request.Form("fornavn") & vbCrLf
str = str & "Efternavn = " & Request.Form("efternavn") & vbCrLf
str = str & "Adresse = " & Request.Form("adresse") & vbCrLf
str = str & "Post nr. = " & Request.Form("postnr") & vbCrLf
str = str & "By = " & Request.Form("by") & vbCrLf
str = str & "E-mail = " & Request.Form("email") & vbCrLf
str = str & "Telefon nr. = " & Request.Form("telefonnr") & vbCrLf
str = str & "Alder = " & Request.Form("alder") & vbCrLF & vbCrLF
str = str & "Valg af distance:" & vbCrLF
str = str & "Valgte distance er = " & Request.Form("R1") & vbCrLf & vbCrLf
str = str & "Valg af betalingstype:" & vbCrLF
str = str & "Valgte betalingstype er = " & Request.Form("R2") & vbCrLf & vbCrLf
str = str & "Øvrigt:" & vbCrLF
str = str & "Evt. kommentar = " & Request.Form("kommentar") & vbCrLF & vbCrLF & vbCrLF & vbCrLF
str = str & "Vedkommendes Computer / ID oplysninger:" & vbCrLF
str = str & "IP: " & Request.ServerVariables("REMOTE_ADDR") & VbCrLf
str = str & "Browser: " & Request.ServerVariables("HTTP_USER_AGENT") & VbCrLf & VbCrLf
JMail.Body = str
' Send den
JMail.Execute
Response.Redirect "tilmeld_tak.asp"
Set JMail = Nothing
end if
%>
<form method="POST" action="tilmeld_aktiv.asp">
<table border="0" width="101%">
<tr>
<td width="29%"><font size="1" face="Verdana">Sendes til</font></td>
<td width="4%">:</td>
<td width="69%"><font face="Verdana" size="1">
<select name="_modtager" style="width: 215; height: 23">
<option value="xx@xx.com">Tilmelding online</option>
</select>
</font></td>
</tr>
<tr>
<td width="29%"> </td>
<td width="4%"></td>
<td width="69%"></td>
</tr>
<tr>
<td width="100%" colspan="3"><b>Generel information:</b></td>
</tr>
<tr>
<td width="29%"><font face="Verdana" size="1">Fornavn</font></td>
<td width="4%"><font face="Verdana" size="1">:</font></td>
<td width="69%"><input type="text" name="fornavn" size="32"></td>
</tr>
<tr>
<td width="29%"><font face="Verdana" size="1">Efternavn</font></td>
<td width="4%"><font face="Verdana" size="1">:</font></td>
<td width="69%"><input type="text" name="efternavn" size="32"></td>
</tr>
<tr>
<td width="29%">Adresse</td>
<td width="4%">:</td>
<td width="69%"><input type="text" name="adresse" size="32"></td>
</tr>
<tr>
<td width="29%">Post nr.</td>
<td width="4%">:</td>
<td width="69%"><input type="text" name="postnr" size="5"> By: <input type="text" name="by" size="18"></td>
</tr>
<tr>
<td width="29%"><font face="Verdana" size="1">E-mail</font></td>
<td width="4%">:</td>
<td width="69%"><input type="text" name="email" size="32"></td>
</tr>
<tr>
<td width="29%">Telefon nr.</td>
<td width="4%">:</td>
<td width="69%"><input type="text" name="telefonnr" size="32"></td>
</tr>
<tr>
<td width="29%">Alder</td>
<td width="4%">:</td>
<td width="69%"><input type="text" name="alder" size="20">td>
</tr>
<tr>
<td width="29%"> </td>
<td width="4%"></td>
<td width="69%"></td>
</tr>
<tr>
<td width="102%" colspan="3"><b>Valg af distance:</b></td>
</tr>
<tr>
<td width="29%">12 km.</td>
<td width="4%">:</td>
<td width="69%"><input type="radio" value="distance 12km" name="R1"></td>
</tr>
<tr>
<td width="29%">6 km.</td>
<td width="4%">:</td>
<td width="69%"><input type="radio" name="R1" value="distance 6km"></td>
</tr>
<tr>
<td width="29%"> </td>
<td width="4%"></td>
<td width="69%"></td>
</tr>
<tr>
<td width="102%" colspan="3"><b>Valg af betalingstype:</b></td>
</tr>
<tr>
<td width="29%">Bank</td>
<td width="4%">:</td>
<td width="69%"><input type="radio" name="R2" value="bank"></td>
</tr>
<tr>
<td width="29%">Giro</td>
<td width="4%">:</td>
<td width="69%"><input type="radio" name="R2" value="giro"></td>
</tr>
<tr>
<td width="29%"></td>
<td width="4%"></td>
<td width="69%"><i><font color="#FF0000">Læs mere om hvordan du
betaler, information om hver betalingstype og betalingsbetingelser <a href="http://www.xx.com" target="_blank">her...</a>
(åbner i nyt vindue)</font></i></td>
</tr>
<tr>
<td width="102%" colspan="3"><b>Øvrigt:</b></td>
</tr>
<tr>
<td width="29%">Evt. kommentar</td>
<td width="4%">:</td>
<td width="69%"><textarea rows="5" name="kommentar" cols="34"></textarea></td>
</tr>
<tr>
<td width="29%"> </td>
<td width="4%"></td>
<td width="69%"></td>
</tr>
<tr>
<td width="29%"></td>
<td width="4%"></td>
<td width="69%"><font face="Verdana" size="1">
<input type="submit" value="Send besked" name="Post">
<input type="reset" value="Slet alt" name="reset">
</font></td>
</tr>
</table>
</form>