Jeg får 2 mails sendt hver gang jeg sender en besked via jmail hvad laver jeg forkert her?
En anden ting jeg får heller ikke fornavn og efternavn med i mailen?
Mine kode:
Kontakt.asp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Kontakt Familien Christiansens</title>
<meta name="description" content="Christiansens Hjemmeside">
<meta name="keywords" content="Thailand, Familiebilleder, Rengøring">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<form name="YourFormName" method="Post" action="mail_sender.asp">
<table>
<tr><td>Email: </td>
<td><input type="text" name="Email" size="50"></td></tr>
<tr><td>First Name: </td>
<td><input type="text" name="FirstName" size="50"></td></tr>
<tr><td>Last Name: </td>
<td><input type="text" name="LastName" size="50"></td></tr>
<tr><td>Subject: </td>
<td><input type="text" name="Subject" size="50"></td></tr>
<tr><td>Comments: </td>
<td><textarea name="Comments"></textarea></td> </tr>
</table>
<input type="submit" name="Submit" value="Submit Form">
</form>
</body>
</html>
mail_sender.asp
<%
DIM strEmail, strFirstName, strLastName, strSubject, strComments, Mailer
strEmail = Request.Form("Email")
strFirstName = Request.Form("FirstName")
strLastName = Request.Form("LastName")
strSubject = Request.Form("Subject")
strComments = Request.Form("Comments")
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "xxxx.mitdomæne.dk"
JMail.AddRecipient "minemail@mitdomæne.dk"
JMail.Sender = strEmail
JMail.Subject = strSubject
JMail.ContentType = "text/html"
JMail.Body = strComments
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Execute
IF NOT JMail.Execute THEN
Response.Write( "ERROR MESSAGE: " & JMail.ErrorMessage & "<BR>" & vbcrlf )
Response.Write( "ERROR SOURCE: " & JMail.ErrorSource & "<BR>" & vbcrlf )
Response.Write( "LOG: <pre>" & JMail.Log & "</pre>" & vbcrlf )
ELSE
Response.Write "<blockquote>Your :<b>" & strSubject & "</b> Newsletter has been successfully sent to <b>" & intSubscribers & "</b> subscribers.</blockquote>"
END IF
%>