Sending an Email with an Attachment
By Rob Taylor
Here is a simple example of sending an email with an attachment using CDONTS.
<%
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
%>
|
Copyright 2010 QuinStreet Inc. All Rights Reserved.
Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers
|