Nu har jeg ændret det, men jeg modtager følgende fejlmeddelelse:
"jmail.SMTPMail error '8000ffff'
WSAGetLastError() returned 11001, Host not found
/shop/order_send.asp, line 202"
Hjemmesiden kan ses inde på
www.frip.dk/shopDet er når kontaktoplysningerne skal sendes at fejlen kommer.
Den fuldstændige kode til filen, som burde kunne sende formlen af sted:
-----------------------------------------------------------------------
<!-- #include file="order_configuration.asp" -->
<%
Dim Kategorier(100,4)
Set db = Server.CreateObject("ADODB.Connection")
Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("e-shop.mdb")
db.Open Connect
SQL = "SELECT KategoriNavn, KategoriParent, KategoriID, KategoriRank FROM Kategorier ORDER BY KategoriRank"
Set rs = db.Execute(SQL)
While Not rs.EOF
If i<100 Then
Kategorier(i,0) = rs("KategoriNavn")
Kategorier(i,1) = rs("KategoriParent")
Kategorier(i,2) = rs("KategoriID")
Kategorier(i,3) = rs("KategoriRank")
End If
i = i+1
rs.MoveNext
Wend
arrayLength = i-1
Function show_search(parent1, CategoryLayer)
If parent1 <> vbNullString Then
For t = 0 To arrayLength
If Kategorier(t,1) = parent1 Then
EmptySpace = ""
For x = 0 To CategoryLayer
EmptySpace = EmptySpace & ""
Next
' -> VED AT ÆNDRE 'EmptySpace & ""' TIL 'EmptySpace & " "' LAVES EN INDRYKNING FOR HVER KATEGORI.
If CategoryLayer = 0 Then
AddOn = ""
AddOn1 = ""
End If
Response.Write( EmptySpace & "<a href='order_product.asp?r="&Kategorier(t,2)&"'>" & AddOn & Kategorier(t,0) & AddOn1 & "</a><br clear='all'>" & vbCrLf)
parent2 = Kategorier(t,2)
CategoryLayer1 = CategoryLayer +1
show_search parent2, CategoryLayer1
End If
Next
End If
End Function
Function CheckField(input)
If Len(input)<1 Then OK = 1
CheckField = input
End Function
%>
<%
Response.AddHeader "cache-control","private"
Response.AddHeader "pragma","no-cache"
Response.CacheControl = "no-cache"
Response.CacheControl = "private"
Response.Expires = -1
Response.ExpiresAbsolute = Now() -1
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>e-shop'en</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="expires" content="-1">
<meta http-equiv="pragma" content="no-cache">
<meta name="author" content="e-shop'en">
<meta name="description" content="e-shop'en">
<meta name="keywords" content="e-shop'en">
<link rel="stylesheet" type="text/css" href="e-shop.css">
</head>
<body onLoad="if ('Navigator' == navigator.appName) document.forms[0].reset();">
<!-- TITEL START -->
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td align="left" valign="top" width="100%">
<h1>e - s h o p ' e n</h1>
</td>
</tr>
</table>
<!-- TITEL SLUT -->
<!-- TOM TABEL FOR AT GIVE MERE PLADS -->
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td align="center" valign="top" width="100%">
<p> </p>
</td>
</tr>
</table>
<!-- INDHOLD START -->
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td align="left" valign="top" width="140">
<h3>Ordre Status</h3>
</td>
<td align="left" valign="top" width="460">
<%
OK = 0
If OrderForm_Company = true Then orderPerson = OrderPerson & OrderEmail_Company & ": " & CheckField(Request.Form("OrderForm_Company")) & vbCrLf
If OrderForm_Name = true Then orderPerson = OrderPerson & OrderEmail_Name & ": " & CheckField(Request.Form("OrderForm_Name")) & vbCrLf
If OrderForm_Street = true Then orderPerson = OrderPerson & OrderEmail_Street & ": " & CheckField(Request.Form("OrderForm_Street")) & vbCrLf
If OrderForm_PostalCode = true Then orderPerson = OrderPerson & OrderEmail_PostalCode & ": " & CheckField(Request.Form("OrderForm_PostalCode")) & vbCrLf
If OrderForm_City = true Then orderPerson = OrderPerson & OrderEmail_City & ": " & CheckField(Request.Form("OrderForm_City")) & vbCrLf
If OrderForm_Phone = true Then orderPerson = OrderPerson & OrderEmail_Phone & ": " & CheckField(Request.Form("OrderForm_Phone")) & vbCrLf
If OrderForm_Email = true Then orderPerson = OrderPerson & OrderEmail_Email & ": " & CheckField(Request.Form("OrderForm_Email")) & vbCrLf & vbCrLf
If OrderForm_Message = true Then orderPerson = OrderPerson & OrderEmail_Message & ": " & CheckField(Request.Form("OrderForm_Message")) & vbCrLf
If OK = 0 Then
OnlineOrder = Session("OnlineOrder")
If isArray(OnlineOrder) Then
i = Session("Items")
OrderMailText = OrderMailText & vbCrLf & vbCrLf
OrderMailText = OrderMailText & orderPerson & vbCrLf
OrderMailText = OrderMailText & "-------------------------------------------" & vbCrLf
For t = o To i
If (OnlineOrder(t,0)) <> "" Then
AllTogether_PerProduct = + OnlineOrder(t,0) * OnlineOrder(t,2)
AllTogether_AllProducts = formatNumber(AllTogether_AllProducts + AllTogether_PerProduct,2,,-2)
OrderMailText = OrderMailText & ListProduct & ": " & OnlineOrder(t,4) & vbCrLf
OrderMailText = OrderMailText & ListNumber & ": " & OnlineOrder(t,3) & vbCrLf
OrderMailText = OrderMailText & ListQuantity & ": " & OnlineOrder(t,0) & vbCrLf
OrderMailText = OrderMailText & ListPrice & ": " & ListCurrency & formatNumber(OnlineOrder(t,2),2,,-2) & vbCrLf
OrderMailText = OrderMailText & ListTotal & ": " & ListCurrency & formatNumber(AllTogether_PerProduct,2,,-2) & vbCrLf
OrderMailText = OrderMailText & "-------------------------------------------" & vbCrLf
End If
Next
OrderMailText = OrderMailText & ListSubtotal & ": " & ListCurrency & formatNumber(AllTogether_AllProducts,2,,-2) & vbCrLf
OrderMailText = OrderMailText & ListShipping & ": " & ListCurrency & ListShipping_Value & vbCrLf
OrderMailText = OrderMailText & "-------------------------------------------" & vbCrLf
OrderMailText = OrderMailText & ListSubTotalShipping & ": " & ListCurrency & formatNumber((AllTogether_AllProducts * List_Zero_Value) + ListShipping_Value,2,,-2) & vbCrLf
OrderMailText = OrderMailText & "-------------------------------------------" & vbCrLf
OrderMailText = OrderMailText & ListTax & ": " & ListCurrency & formatNumber((AllTogether_AllProducts * ListTax_Value) + (ListShipping_Value * ListTax_Value),2,,-2) & vbCrLf
OrderMailText = OrderMailText & "-------------------------------------------" & vbCrLf
OrderMailText = OrderMailText & ListTotal_AllTogether & ": " & ListCurrency & formatNumber((AllTogether_AllProducts * ListTotal_AllTogether_Value) + (ListShipping_Value * ListTotal_AllTogether_Value),2,,-2) & vbCrLf
OrderMailText = OrderMailText & "-------------------------------------------"
' ---------> DETTE ER MAIL KOMPONENTEN ('CDONTS', 'JMail', 'ASPMail').
' -> DENNE MAIL KOMPONENT ER 'JMail'.
' -> DETTE ER VARIABLERNE FRA FORMULAR FELTERNE.
Dim strOrderForm_Name
Dim strOrderForm_Email
Dim strRecipient_Name
Dim strRecipient_Email
strOrderForm_Name = Request.Form("OrderForm_Name")
strOrderForm_Email = Request.Form("OrderForm_Email")
strRecipient_Name = "e-shop'en"
strRecipient_Email = "MODTAGER@DOMÆNE.DOT"
' -> DETTE ÅBNER ET MAIL SERVER OBJEKT.
Set JMail = Server.CreateObject("JMail.SMTPMail")
' -> DETTE ER MAIL SERVEREN, DER VIL SENDE E-MAIL'EN.
JMail.ServerAddress = ""
' -> DETTE ER AFSENDERENS NAVN FRA FORMULAR FELTET.
JMail.SenderName = strOrderForm_Name
' -> DETTE ER AFSENDERENS E-MAIL ADRESSE FRA FORMULAR FELTET.
JMail.Sender = strOrderForm_Email
' -> DETTE ER AFSENDERENS SVAR E-MAIL ADRESSE FRA FORMULAR FELTET.
JMail.ReplyTo = strOrderForm_Email
' -> DETTE ER MODTAGERENS E-MAIL ADRESSE OG NAVN ("E-MAIL ADRESSE", "NAVN").
JMail.AddRecipientEx strRecipient_Email, strRecipient_Name
' -> DETTE ER MODTAGERENS E-MAIL ADRESSE OG NAVN ("E-MAIL ADRESSE", "NAVN").
' -> BEMÆRK: DETTE SENDER EN KOPI AF ORDREN TIL AFSENDEREN FRA FORMULAREN.
JMail.AddRecipientEx strOrderForm_Email, strOrderForm_Name
' -> DETTE ER EMNET PÅ E-MAIL'EN.
JMail.Subject = "e-shop'en - Ordre"
' -> DETTE ANGIVER PRIORITETEN: 1 = HØJ, 3 = NORMAL, 5 = LAV.
JMail.Priority = 3
' -> DETTE ANGIVER INDHOLDETS TYPE.
JMail.ContentType = "text/plain"
' -> DETTE ER INDHOLDET AF E-MAIL'EN. STANDARD TEKST ER KOMBINERET MED FORMULAR VARIABLER.
JMail.Body = OrderMailText
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Execute
Set JMail = Nothing
End If
End If
' ---------> HER SLUTTER MAIL KOMPONENTEN.
%>
<%If OK = 0 Then%>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="440">
<tr>
<td align="left" valign="top" width="100%">
<%=OrderSubmitted%>
<!-- ORDRE HER - START -->
<table align="center" border="0" cellpadding="0" cellspacing="0" width="350">
<tr>
<td align="left" valign="top" width="100%">
<p><span class="order"><%
If Not isNull(OrderMailText) Then
OrderMailText = Replace(OrderMailText, vbCrLf, "<br clear='all'>")
Response.Write OrderMailText
End If
%></span></p>
</td>
</tr>
</table>
<!-- ORDRE HER - SLUT -->
</td>
</tr>
</table>
<%Else%><table align="center" border="0" cellpadding="0" cellspacing="0" width="440">
<tr>
<td align="left" valign="top" width="100%">
<%=OrderFailed%>
</td>
</tr>
</table>
<center>
<p>- <a href="java script:history.go(-1);">TILBAGE</a> -</p>
</center>
<%End If%>
<%
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
Erase Kategorier
%>
</td>
</tr>
</table>
<!-- INDHOLD SLUT -->
<!-- TOM TABEL FOR AT GIVE MERE PLADS -->
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td align="center" valign="top" width="100%">
<p> </p>
</td>
</tr>
</table>
<!-- FODNOTE START -->
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td align="center" valign="top" width="100%">
<hr noshade size="1" width="100%">
<p><span class="small">| Alle produkter er fiktive og kun til demonstration |</span></p>
</td>
</tr>
</table>
<!-- FODNOTE SLUT -->
</body>
<head>
<meta http-equiv="expires" content="-1">
<meta http-equiv="pragma" content="no-cache">
</head>
</html>
-----------------------------------------------------------------------
Du kan evt. selv prøve at indsætte nogle oplysninger, for at se fejlmeddelelsen.
Mvh
Peter