11.1.2 Method Details

11.1.2.1 AttachFile
Adds a file attachment to the message. Messages are multi-part mime encoded, and attachments follow the text portion of the message.
Arguments
Source
|
A string containing the full path and filename of the file that should be attached to the message.
|
CDONTS Note: The Source argument can only be a string. There is no provision for providing an IStream pointer as a source for the file to attach. All messages are encoded Base64. There is no provision for specifying a different encoding method.
11.1.2.2 Send
Send the message using the properties previously set. All arguments to this method are optional and override the properties previously set for the message (with the exception of the "To" agument, which is combined with any previously set "To" property.
Calling the Send method re-sets all message properties in preparation for the next message, unless the Retain property is set to True. Multiple messages may be sent using the same instance of the Chili!Soft Mail control.
Arguments
From
|
See the description of the property of the same name above.
|
To
|
See the description of the property of the same name above.
|
Subject
|
See the description of the property of the same name above.
|
Body
|
See the description of the property of the same name above.
|
Importance
|
See the description of the property of the same name above.
|
Host
|
See the description of the property of the same name above.
|
Example 1:
Set mailmsg = Server.CreateObject("CDONTS.NewMail")
mailmsg.To = "youraccount@yourco.com"
mailmsg.From = "MailTest"
mailmsg.Body = "This is a test message." & Chr(10) & "This is the second line."
mailmsg.Host = "mail.yourco.com"
mailmsg.Send
Example 2:
Set mailmsg = Server.CreateObject("CDONTS.NewMail")
Message = "This is a test message." & Chr(10) & "This is the second line."
mailmsg.Send ("myaccount@yourco.com", "youraccount@yourco.com", "Test Subject", Message, 2, "mail.yourco.com")
Copyright © 2000 Chili!Soft
|