Have you ever needed to send email from a web page? Perhaps to build a
"Send this to a Friend" link? Have no fear, CDONTS is here.
You can easily send email (and attachments!) with the Collaboration Data Objects
for NT server. Note that this requires SMTP, which usually requires NT Server.
Let’s assume you’ve made a form for a user to fill out. Here’s the code for the email:
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = Request.Form("From")
objMail.To = Request.Form("To")
objMail.CC = Request.Form("CC")
objMail.BCC = Request.Form("BCC")
objMail.Subject = Request.Form("Subject")
msgBody = "Dear Friend, this email is coming to you from CDONTS!"
objMail.Body = msgBody
objMail.Send
Set objMail = nothing
That’s it! For more detailed information, check here.
If you have a tip you would like to submit, please send it to:
webmaster@asp101.com.