kan ikke få min asp kontakt formular til at virke
Jeg har forsøgt at lægge en kontakt formular op i ASP.Min kode ser sådan ud:
<form method="POST" action="send.asp" name="Formmail1" id="form"><table>
<tr>
<td>Name:</td>
<td><input name="Navn" size="25" maxlength="50"></td>
</tr>
<tr>
<td>Email:</td>
<td><input name="Email" size="25" maxlength="50"></td>
</tr>
<tr>
<td>Telephone:</td>
<td><input name="Telefon" size="25" maxlength="50"> </td>
</tr>
<tr>
<td colspan="2"><div align="center"><center><p><input type="submit" value="Send information"
name="Submit">
</td>
</tr>
</table>
</form>
Og min send.asp ser således ud.
<%
set msg = Server.CreateOBject( "JMail.Message" )
msg.Logging = true
msg.silent = true
msg.ContentType = "text/html"
msg.From = Request.Form("Email")
msg.FromName = Request.Form("Navn")
msg.AddRecipient "xx@xxxxxxx.dk", "modtager navn"
msg.Subject = "Formular test"
msg.Body = "Kontaktoplysninger:" & "<br>Navn: " & Request.Form("Navn") & "<br>Telefon: " & Request.Form("Telefon") & "<br>Email: " & Request.Form("Email") & "<br>Besked: " & Request.Form("Besked")
if not msg.Send("localhost" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Thank you for your message, " & Request.Form("Navn") & ".<p>We will answer you as soon as possible.</p>"
end if
Set msg = Nothing
%><FORM>
<INPUT type="button" class="float_right_mar" onClick="history.back()" value="<< Back to previous page">
</FORM>
ER der nogen der kan hjælpe