NewMail object (CDONTS library)
The NewMail object provides the ability to send a message with only a few lines of code.
Quick Check
Type library declared: CDONTS. Dll
First enabled: CDO for NTS Library version 1.2
Parent object: (None)
Child objects: (None)
Default properties: Value
Property
First-name Enable version type Access
The BCC 1.2 string is write-only
Body 1.2 IStream object or string write only
BodyFormat 1.2 Long Integer write only
Cc 1.2 String Write only
Contentbase 1.2 String Write only
Contentlocation 1.2 String Write only
From 1.2 string write only
Importance 1.2 Long Integer write only
MailFormat 1.2 Long Integer write only
Subject 1.2 String Write only
To 1.2 string write only
Value 1.2 String Write only
Version 1.2 String Read-only
Method
Name first enabled version parameter
Attachfile 1.2 Source as an object or string,
(optional) FileName as a string,
(optional) Encodingmethod as long integral type
Attachurl 1.2 Source as an object or string,
Contentlocation as a string,
(optional) Contentbase as a string,
(optional) Encodingmethod as long integral type
Send 1.2 (optional) from as a string,
(optional) to as a string,
(optional) Subject as a string,
(optional) Body as an object or string,
(optional) Importance as long integral type
Setlocaleids 1.2 Codepageid as Long integral type
Comments
The NewMail object is not built on a common API architecture. Is it Microsoft? Windows NT? Automated processes running in Server are used to quickly generate notification messages. It does not provide any user interface, nor does it provide any interaction during the generation and delivery of messages. Therefore, the properties of the NewMail object are not designed to be read back and checked. Except for Version only, other properties can only be written.
The NewMail object is complete and does not expose any properties that are public to all CDO for NTS library objects.
Once you add attachments and recipients to the NewMail object, you cannot clear them, and the NewMail object itself cannot be deleted. When the Send method completes the task successfully, the NewMail object is invalidated but not purged from memory. The programmer should set the failed object to nothing in order to purge it from memory or reassign it to another NewMail object. An attempt to access a sent NewMail object will result in the return of CdoE_INVALID_OBJECT.
The NewMail object is not in the hierarchy that contains the CDO for NTS Library object. It cannot access any other objects, nor can it be accessed from other objects. Like the session object, it is considered to be the topmost object and directly from Microsoft? Visual Basic? Program creation. Its ProgID is CDONTS. NewMail. The following code creates a NewMail object from an earlier binding:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.