Hej, skulle nån kunna översätta allt det nedan till Jmail (är i AspSmartMail).
<% End If
If Request.Querystring("action") = "sent" Then
Set RecSet=Conn.Execute("SELECT * From nyhetsbrev")
Meddelande = Replace(Request.Form("Meddelande"), vbCrLf, "<BR>" & vbCrLf)
On Error Resume Next
Do While Not RecSet.EOF
Set SmartMail = Server.CreateObject("aspSmartMail.SmartMail")
SmartMail.Server = "mail.aleborg.com"
SmartMail.SenderAddress = dinemail
SmartMail.Recipients.Add RecSet("Email")
SmartMail.Subject = Request.Form("Subject")
Body = "<font face=verdana size=1>"
Body = Body & "<b>Nyhetsbrev från " & sidnamn & "!</b><br>"
Body = Body & "---------------------------------------------------------------------<br>"
Body = Body & "<b>Skickades:</b> " & Now & "<br>"
Body = Body & "---------------------------------------------------------------------<br>"
HTML = HTML & Meddelande & "<br>"
Body = Body & "</font>"
SmartMail.Body = Body
SmartMail.Charset = "iso-8859-1"
SmartMail.ContentType = "text/html"
SmartMail.SendMail
RecSet.MoveNext
Loop
RecSet.Close
Set RecSet = Nothing
Session("mess") = "<b>Nyhetsbrevet har nu skickats!</b>"
Response.Redirect "admin.asp?sektion=4"
End If
If Request.Querystring("action") = "sent2" Then
Meddelande = Replace(Request.Form("Meddelande"), vbCrLf, "<BR>")
Meddelande = Meddelande & vbCrLf
Set SmartMail = Server.CreateObject("aspSmartMail.SmartMail")
SmartMail.Server = "mail.aleborg.com"
SmartMail.SenderAddress = dinemail
SmartMail.Recipients.Add RecSet("Email")
SmartMail.Subject = Request.Form("Subject")
Body = Body & "<font face=verdana size=1>"
Body = Body & "<b>Nyhetsbrev från " & sidnamn & "!</b><br>"
Body = Body & "---------------------------------------------------------------------<br>"
Body = Body & "<b>Skickades:</b> " & Now & "<br>"
Body = Body & "---------------------------------------------------------------------<br>"
Body = Body & Meddelande & "<br>"
Body = Body & "</font>"
SmartMail.Body = Body
SmartMail.Charset = "iso-8859-1"
SmartMail.ContentType = "text/html"
SmartMail.SendMail
Session("mess") = "<b>Nyhetsbrevet har nu skickats till " & Request.Form("email") & "!</b>"
Response.Redirect "admin.asp?sektion=4"
End If
If Request.Querystring("action") = "delete" Then
Conn.Execute("Delete * From nyhetsbrev Where id=" & Request.Querystring("id"))
Response.Redirect "admin.asp?sektion=4"
End If
End If