Clan [+35] Forum
Clan [+35] Forum
[+35] Hovedkvarter | Profil | Tilmeld | Aktive emner | Forummedlemmer | S�gning | FAQ
Brugernavn:
Kodeord:
Husk kodeord
Glemt dit kodeord?

 Alle fora
 Computere
 [+35] Jumpy's strange world of computers
 jmail
 Nyt emne  Emnet er l�st
 Vis printervenlig version
Forfatter Forrige emne Emne N�ste emne  

[+35]Jumpman
[+35] Server Admin, [+35] Member of COW - G5

Denmark
6728 indl�g

Skrevet - 26 Apr 2009 :  17:15:27  Vis profil  Bes�g [+35]Jumpman's hjemmeside
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
%>

Rettet af - [+35]Jumpman @ 26 Apr 2009 17:16:25

[+35]6-shooter_X
[+35] co-Clan Founder, [+35] Member of COW

4556 Posts

Skrevet - 26 Apr 2009 :  23:14:19  Vis profil  Bes�g [+35]6-shooter_X's hjemmeside  Klik for at se [+35]6-shooter_X's MSN Messenger adresse
Du skriver "JMail.Execute" 2 gange.

Du skal nøjes med den i IF-sætningen.

**** Cow(ard) of the county ****
G� til toppen af siden

[+35]Jumpman
[+35] Server Admin, [+35] Member of COW - G5

Denmark
6728 Posts

Skrevet - 27 Apr 2009 :  00:51:18  Vis profil  Bes�g [+35]Jumpman's hjemmeside
Yep takker den er fixet




G� til toppen af siden
  Forrige emne Emne N�ste emne  
 Nyt emne  Emnet er l�st
 Vis printervenlig version
Hop til:
Clan [+35] Forum © 2000-2002 Snitz Communications Go To Top Of Page
Tilpasset ældre læsere - vist på [:)] 0.25 sek. Snitz Forums 2000