Ændring af brug af ASP komponent, fra CDONTS til w3 JMail
Jeg har downloadet et program som sender en mail ud, programmet bruger mail komponenten CDONTS. Mit problem er at min Domæne udbyder ikke understøtter CDONTS men derimod Jmail. jeg skal have skrevet programmet om så det bruger jmail istedet, koden ses nedenfor.Er der nogen som kan det ???
Dim objCDOMail, strBody
strBody = "Dette er en automatisk sendt email. <a href='http://localhost/Nice_sell/approve.asp?ID=" & postid & "&rand=" & randpassword & "'" & ">Godkend</a>."
'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objCDOMail.From = " " & sendername & " <webmaster@harleyguiden.dk>" & ""
'Who the e-mail is sent to
objCDOMail.To = RS("Email")
'Set the e-mail body format (0=HTML 1=Text)
objCDOMail.BodyFormat = 0
'Set the mail format (0=MIME 1=Text)
objCDOMail.MailFormat = 0
'Set the subject of the e-mail
objCDOMail.Subject = subject
'Set the main body of the e-mail
objCDOMail.Body = strBody
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
objCDOMail.Importance = 1
'Send the e-mail
objCDOMail.Send
'Close the server object
Set objCDOMail = Nothing
end if
Næste fil
'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objCDOMail.From = "www.harleyguiden.dk <webmaster@harleyguiden.dk>"
'Who the e-mail is sent to
objCDOMail.To = visitoremail
'Set the e-mail body format (0=HTML 1=Text)
objCDOMail.BodyFormat = 0
'Set the mail format (0=MIME 1=Text)
objCDOMail.MailFormat = 0
'Set the subject of the e-mail
objCDOMail.Subject = "Advertisement approval"
'Set the main body of the e-mail
objCDOMail.Body = strBody
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
objCDOMail.Importance = 1
'Send the e-mail
objCDOMail.Send
'Close the server object
Set objCDOMail = Nothing