CDONTS with Attachment
Example of CDONTSwith attachment for emailing
<%
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
% >
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