Jerry Nixon on Windows: Revisiting CDONTS Syntax

Jerry Nixon on Windows

Tuesday, October 19, 2004

Revisiting CDONTS Syntax

This is the syntax for old-school CDONTS:

dim path ' as string
path = "c:\file.txt"

' email a file
set mail = createobject("cdonts.newmail")
mail.To = "jerry@email.com;nixon@email.com"
mail.Cc = "jerry@email.com;nixon@email.com"
mail.Bcc = "jerry@email.com;nixon@email.com"
mail.From = "jerry nixon "
mail.Value("Reply-To") = "jerry@integro.com"
mail.Subject = "email a file"
mail.Body = "file is attached"
mail.BodyFormat = 0 ' 0 (html), 1 (text)
mail.MailFormat = 0 ' 0 (mime), 1 (text)
mail.Importance = 1 ' 0 (low), 1 (norm), 2 (high)
mail.AttachFile(path)
mail.Send()
set mail = nothing