Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replace JMAIL with CDONTS method

Status
Not open for further replies.

richey1

Technical User
Oct 5, 2004
184
GB
Hi

we have a product with the following code. How can I edit it so it uses CDONTS and not JMAIL

regards
richard

Function SendEmail(sTo, sFrom, sSubject, sBody)

on error resume next
Set objMsg = Server.CreateObject("JMail.Message")
objMsg.AddRecipient sTo
objMsg.From = sFrom
objMsg.Subject = sSubject
objMsg.Body = sBody
objMsg.Silent = true
objMsg.Logging = true


if not objmsg.Send(Application("MailServer")) then
Response.Write "Email To : " & sTo & "<br>"
Response.Write "Email From : " & sFrom & "<br>"
Response.Write "Email subject : " & sSubject & "<br>"
Response.Write "Email body : <pre>" & sBody & "</pre><br><br>"

Response.write "<pre>" & objmsg.log & "</pre>"
else
Response.Redirect("main.asp?page=" & strNPage)
end if

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top