Session Object
Parent object: None
The Session object is the top-level object in the CDONTS hierarchical object model. Unless you use the NewMail object, you must have an active Session object to send messages using the CDONTS library. The Session object's properties and methods are shown in Table 15.21 and Table 15.22, respectively.
Table 15.21. Session Object Properties
|
Property |
Description |
|---|---|
|
InBox |
A Folder object that represents the current Inbox of the current session |
|
MessageFormat |
An integer value that represents the default message encoding for any Message object instantiated within the current session |
|
Name |
A string value that represents the display name used to log into the mail system for this session |
|
OutBox |
A Folder object that represents the current Outbox of the current session |
|
Version |
A string value that represents the version of the CDO library |
Table 15.22. Session Object Methods
|
Method |
Description |
|---|---|
|
GetDefaultFolder |
Retrieves the default Folder object for the current session |
|
Logoff |
Closes the current session with the mail system and logs off from the system |
|
LogonSMTP |
Initializes the current session |
|
SetLocaleIDs |
Sets the default locale ID for messages sent or received during this session |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access