programming-examples/asp/More_Code_Snippets/Show how to send an attachment with your e-mail.asp
2019-11-18 14:25:58 +01:00

18 lines
522 B
Plaintext

<%
Dim objCDONTS
'create an instance of the object
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
'senders emial address
objCDONTS.From = "myaddress@email.com"
'recipients email address
objCDONTS.To = "someonelses@email.com"
'this is your subject (title of email)
objCDONTS.Subject = "here is the file"
'file to be attached
objCDONTS.AttachFile "d:\myfile.txt"
'main text body
objCDONTS.Body ="Here is the file we promised"
'send the email
objCDONTS.Send
Set objCDONTS = Nothing
%>