Email-CDONTS

CDONTS with Attachment
Example of CDONTSwith attachment for emailing

CodeFunctionName
What is this?

Public

Not Tested

Original Work
<%
Option Explicit
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "friend@somewhere.com"
objMail.Subject = "A message TO you"
objMail.AttachFile("d:\images\pic.gif")
objMail.To = "someone@someplace.com"
objMail.Body = "This is the body of the Message"
objMail.Send
Response.write("Mail was Sent")
'You must always do this with CDONTS.
set objMail = nothing
% >

Views 4,636

Downloads 1,553

CodeID
DB ID

JeffSmith
26
Revisions

v1.0

Sunday
May
27
2018