LogonSMTP Method (CDONTS Session Object)

The LogonSMTP method initializes the Session object.

Syntax

objSession.LogonSMTP(DisplayName, Address) 
 
objSession
Required. The Session object.
DisplayName
Required. String. The display name to use for the messaging user logging on, such as "John Q. Doe".
Address
Required. String. The full e-mail address to use for the messaging user logging on, such as "jdoe@company.com".

Remarks

Your application must call LogonSMTP before it can use any CDO for NTS Library object, including the Session object. An attempt to access any programming element prior to a successful LogonSMTP call results in a CdoE_NOT_INITIALIZED error return. The only exception to this rule is the Session object's SetLocaleIDs method.

An application using the CDO for NTS Library binds by address to the mailbox you specify in the LogonSMTP parameters:

   objSession.LogonSMTP("My Name", "myaddress@mycompany.com") 
 

The identity of a user logging on with this syntax is not authenticated. The user can assume any arbitrary identity.

When CDO for NTS is running with IIS, the Inbox is a common folder shared by all recipients and applications, and containing all undeleted messages received by Microsoft® Internet Information Server (IIS). However, your application can access only those messages destined for the mailbox you bind to in the LogonSMTP call.

When CDO for NTS is running with the Microsoft Exchange Server, the Inbox is the regular Inbox of the messaging user's mailbox. When CDO for NTS is running with Microsoft Exchange Express, the Inbox is the messaging user's POP3 server Inbox.

The session is terminated by the Logoff method.