Can someone show me CDONTS code?

elifer

Guppy
Hello,
Can someone help me with CDONTS? I don't know how to convert this code to CDONTS! If you can please help me out.

Thanks

<%
Function SendEmail( sEmailServer, sFromEmail, sToEmail, sSubject, sText )
Dim objMail
set objMail = server.createobject("SMTPsvg.Mailer")
objMail.FromName = sFromEmail
objMail.FromAddress = sFromEmail
objMail.RemoteHost = sEmailServer
objMail.AddRecipient sToEmail, sToEmail
objMail.Subject = sSubject
objMail.BodyText = sText
if objMail.SendMail then
SendEmail = ""
else
' Message send failure
SendEmail = objMail.Response
end if
Set objMail = nothing
End Function
%>
 
<%
Set objMail = Server.CreateObject("CDONTS.Newmail")
objMail.To = request.form ("recipient")
objMail.Subject = request.form ("subject")
objMail.From = request.form ("sender")
objMail.Body = request.form ("body")
objMail.Send
Set objMail = Nothing
%>
 
Back
Top