Displaying  Source Code(s)  
 

 
CDONTS with Attachment

--------------------------------------------------------------------------------

Description : 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:imagespic.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
%>
 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG