<%
Set Conn = Server.Createobject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.Mappath ("Config/DB.mdb")
Conn.Open DSN
StrSQL = "Select * from tilmeldte"
set rs = Conn.execute(strSQL)
Do While Not (rs.Eof or rs.Bof)
strEmail = rs("email")
strNavn = rs("navn")
strAf = request.form("afnavn")
strBesked = request.form("besked")
strBesked = replace(strBesked,vbCrLf,"<BR>")
strBesked = Replace(strBesked,"
","<b>")
strBesked = Replace(strBesked,"","</b>")
strBesked = Replace(strBesked,"
","<i>")
strBesked = Replace(strBesked,"","</i>")
strBesked = Replace(strBesked,"
","<u>")
strBesked = Replace(strBesked,"","</u>")
strBesked = Replace(strBesked,"[url]","<a href=""")
strBesked = Replace(strBesked,"[/url]",""">»link«</a>")
Set regExp = New RegExp
regExp.Pattern = "\[mail\]([a-z0-9_\-@\.]+)\[\/mail\]"
regExp.Global = true
regExp.IgnoreCase = true
strBesked = regExp.Replace(strBesked, "<a href=""mailto:$1"">$1</a>")
Set regExp = Nothing
Set JMail = Server.CreateObject("JMail.SMTPMail")
Response.Expires = 0
JMail.ContentType = "text/html"
JMail.ServerAddress = "mail.ikstart.dk"
JMail.Sender = "svar-ikke@ikstart.dk"
JMail.AddRecipientEx "" & strEmail & "", "" & strEmail & ""
JMail.Subject = "Nyhedsbrev fra
www.ikstart.dk" JMail.Priority = 3
JMail.Body = JMail.Body & "<body bgcolor='#EEF3FB'>"
JMail.Body = JMail.Body & "<br><div align='center'>"
JMail.Body = JMail.Body & "<table border='1' width='570' id='table1' style='border: 1px solid #C0C0C0; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px' cellspacing='0' cellpadding='0'>"
JMail.Body = JMail.Body & "<tr>"
JMail.Body = JMail.Body & "<td style='border-style: none; border-width: medium' height='57' background='
http://www.ikstart.dk/images/nyhedsbrev_logo.gif' bgcolor='#FFFFFF'>"
JMail.Body = JMail.Body & "<table border='1' width='100%' id='table4' style='border-width: 0px' cellspacing='4'>"
JMail.Body = JMail.Body & "<tr>"
JMail.Body = JMail.Body & "<td style='border-style: none; border-width: medium'><b><i>"
JMail.Body = JMail.Body & "<font color='#808080' size='4' face='Arial'>Nyhedsbrev</font></i></b><br>"
JMail.Body = JMail.Body & "<i><font style='font-size: 9pt' face='Arial'>fra Døves Idrætsklub START</font></i></td>"
JMail.Body = JMail.Body & "</tr>"
JMail.Body = JMail.Body & "</table>"
JMail.Body = JMail.Body & "</td>"
JMail.Body = JMail.Body & "</tr>"
JMail.Body = JMail.Body & "<tr>"
JMail.Body = JMail.Body & "<td style='border-style: none; border-width: medium' bgcolor='#C0C0C0' height='20'>"
JMail.Body = JMail.Body & "<p align='right'>"
JMail.Body = JMail.Body & "<font face='Arial' style='font-size: 8pt' color='#FFFFFF'>Sendt til: " & strEmail & "</font></td>"
JMail.Body = JMail.Body & "</tr>"
JMail.Body = JMail.Body & "<tr>"
JMail.Body = JMail.Body & "<td style='border-style: none; border-width: medium' bgcolor='#FFFFFF'>"
JMail.Body = JMail.Body & "<div align='center'>"
JMail.Body = JMail.Body & "<table border='1' width='100%' id='table2' style='border-width: 0px' cellspacing='6' cellpadding='2'>"
JMail.Body = JMail.Body & "<tr>"
JMail.Body = JMail.Body & "<td style='border-style: none; border-width: medium'>"
JMail.Body = JMail.Body & "<b><font face='Arial' size='2' color='#808080'>Hej " & strNavn & ".</font></b><font face='Arial' style='font-size: 9pt'><b><br></b></font>"
JMail.Body = JMail.Body & "<font face='Arial' style='font-size: 8pt'>"
JMail.Body = JMail.Body & "<font color='#808080'>Det er ikke muligt at kontakte Døves Idrætsklub START ved at svare på denne mail. Du kan i stedet for skrive til </font>"
JMail.Body = JMail.Body & "<span style='color: black'>"
JMail.Body = JMail.Body & "<a href='mailto:start@ikstart.dk'>start@ikstart.dk</a>"
JMail.Body = JMail.Body & "</span><font color='#808080'>- Hvis har du kommentarer eller spørgsmål, er du naturligvis velkommen til at skrive til os.</font></font><hr>"
JMail.Body = JMail.Body & "<p><font face='Arial' style='font-size: 9pt'>" & strBesked & "</font></p>"
JMail.Body = JMail.Body & "<p><font color='#808080'><font face='Arial' size='2'><b>"
JMail.Body = JMail.Body & "<i>Sportslig hilsen</i></b><br>"
JMail.Body = JMail.Body & "</font><i><font face='Arial' size='2'>Døves Idrætsklub START</font></i></font><p align='right'><i>"
JMail.Body = JMail.Body & "<font face='Arial' style='font-size: 8pt'>Skrevet af: " & strAf & "</font></i></td>"
JMail.Body = JMail.Body & "</tr>"
JMail.Body = JMail.Body & "</table>"
JMail.Body = JMail.Body & "</div>"
JMail.Body = JMail.Body & "</td>"
JMail.Body = JMail.Body & "</tr>"
JMail.Body = JMail.Body & "</table>"
JMail.Body = JMail.Body & "</div>"
JMail.Body = JMail.Body & "<div align='center'>"
JMail.Body = JMail.Body & "<table border='1' width='570' style='border: 1px solid #FF0000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; background-color: #FFE1E1' cellspacing='4'>"
JMail.Body = JMail.Body & "<tr>"
JMail.Body = JMail.Body & "<td style='border-style: none; border-width: medium'>"
JMail.Body = JMail.Body & "<font size='2' face='Arial'><b>Frameld:</b><br>"
JMail.Body = JMail.Body & "Hvis du ønske ikke modtager mere på nyhedsbrev: (<a href='
http://www.ikstart.dk/nyhedsbrev.asp?mode=frameld&email="&strEmail&"'>klik her</a>)</font></td>"
JMail.Body = JMail.Body & "</tr>"
JMail.Body = JMail.Body & "</table></div>"
JMail.Body = JMail.Body & "<div align='center'>"
JMail.Body = JMail.Body & "<table border='1' width='570' id='table3' cellspacing='0' cellpadding='0' style='border-width: 0px' height='26'>"
JMail.Body = JMail.Body & "<tr>"
JMail.Body = JMail.Body & "<td style='border-style: none; border-width: medium' align='right' height='35'>"
JMail.Body = JMail.Body & "<p align='center'><font face='Arial' size='1'>Copyright© 2006 - Døves Idrætsklub START<br>Nyhedsbrev Version 1.08</font></td>"
JMail.Body = JMail.Body & "</tr>"
JMail.Body = JMail.Body & "</table>"
JMail.Body = JMail.Body & "</div>"
JMail.Execute <<<=== Linje fejlkode: 172
Set JMail = Nothing
response.write "<font face='Verdana' size='2'>" & strEmail & " - Afsendt korrekt</font><br>"
rs.MoveNext
Loop
response.write "<font face='Verdana' size='2'><br><br><b>Alle beskeder blev afsendt korrekt.</font</b>"
response.write "<meta HTTP-EQUIV=""REFRESH"" CONTENT=""000000003; URL=default.asp?action=nyhedsbrev"">"
Conn.Close
%>
Selvom virker godt med sende alt så ingen problem.. men er pludselig kommer virker ikke.. jeg synes er underligt!! du kan se står hvor er fejl "JMail.Execute <<<=== Linje fejlkode: 172" derfor.. jeg kunne ikke umuligt får løsning..