Previous in Contents Next in Contents

Class TMAdmin

Programmatic Identifier

MemAdmin.TMAdmin.1

CLSID

2DAA5B81-A873-11D0-8397-0080C7824F8A

COM Class Name

TMAdmin or DMailConfig

Type Library Name

TMAdmin 1.0 Type Library

Type Library Location

c:\microsoft site server\bin\p&M\TMMsgBld.dll

Objects of this class can be used to view and set configuration information relating to Direct Mail server instances.

Administrators must use the special COM class ObjCreator (ObjCreator.ObjCreator.1) CreateObjAuth method to create instances of this class.  Directly creating instances will render properties and methods “read-only.” If the instance is created with the ObjCreator object, the calling process/thread must have Windows NT administrative privileges.

Interfaces

The TMAdmin COM class exposes the dual interface ITMAdmin.  Client applications may access the methods and properties through the COM interface ITMAdmin or through the dispinterface ITMAdmin via the IDispatch COM interface.

Interface ITMAdmin

StartPackage

This method starts the mail package specified by the passed GUID value.

IDL Definition

HRESULT StartPackage([in] BSTR bstrGUID );

Parameters

BstrGUID

The package's GUID.

Return Values

A standard COM HRESULT.

Example

StopPackage

This method stops the package specified by the passed GUID value.

IDL Definition

HRESULT StopPackage ([in] BSTR bstrGUID );

Parameters

BstrGUID

The package's GUID.

Return Values

a standard HRESULT.

CancelPackage

This method deletes the package specified by the passed GUID value.

IDL Definition

HRESULT CancelPackage ([in] BSTR bstrGUID );

Parameters

BstrGUID

The package's GUID value.

Return Values

a standard HRESULT value

ResetEnum

This method resets the enumerator to the first package in the list.

IDL Definition

HRESULT ResetEnum([in]  long lVInst );

Parameters

lVInst

The server instance identifier to enumerate packages for.

Return Values

a standard HRESULT value

NextPackages

This method returns a package from the enumeration.  A programmer can call NextPackages continually, enumerating all packages, until the enumeration is exhausted.

IDL Definition

HRESULT NextPackages([out] VARIANT* pVar, [out]  long* pFetched );

Parameters

pVar

a VT_BSTR holding the address of the GUID value for the package.

pFetched

a VT_I4 variable indicating the number of the package in the sequence.

Return Values

a standard HRESULT value

CheckLDAPPassword

This method attempts to bind a TCP/IP socket to the LDAP server instance running on the machine and port number specified.  If successful, it presents the account name and password to attempt authentication with the LDAP server instance.  This method uses the LDAP protocol when authenticating.

IDL Definition

HRESULT CheckLDAPPassword(
[in] BSTR bstrDS, 
[in] BSTR bstrAcct, 
[in] BSTR bstrPwd, 
[in] unsigned long ulPort
);

Parameters

bstrDS

a name of the machine hosting the LDAP service.  Must be a valid network name or DNS name.  This name will be used to lookup an IP address when binding a TCP/IP socket to the machine hosting the LDAP server.

bstrAcct

the account name to present when authenticating with the LDAP server.

bstrPwd

the account password to present when authenticating with the LDAP server.

ulPort

the port to use when binding the TCP/IP socket to the machine specified by bstrDS.

Return Values

the HRESULT can have one of the following values:

#define Name Description
S_OK success.
TMAIL_E_CONNECT_FAILED a TCP/IP connection could not be established with the target machine.
TMAIL_E_LOGIN_FAILED a connection was established, but the server refused the credentials.

CheckSMTPServer

This method attempts to bind a TCP/IP socket to the SMTP server port 25 on the machine specified.  If successful, it immediately closes the socket.  Use this method to verify the connectivity to an SMTP server before starting a mailing package.

IDL Definition

HRESULT CheckSMTPServer([in] BSTR bstrSMTP);

Parameters

bstrSMTP

the name of the machine hosting the SMTP server.  The name must be a valid DNS name for the machine.  This name is used to do an IP address lookup when creating the TCP/IP socket connection to the server.  The well-known SMTP port 25 is used when binding the socket.

Return Value

the HRESULT returned can have one of the following values:

#define Name Description
S_OK success.
E_INVALIDARG the name passed could not be resolved to a valid IP address..
E_OUTOFMEMORY an error occurred during a memory initialization routine.  The system has run out of memory..
TMAIL_E_CONNECT_FAILED a TCP/IP connection could not be established with the specified machine.

CheckPOP3Password

This method attempts to bind a TCP/IP socket to the POP3 server port 110 on the machine specified.  If successful, it attempts to properly authenticate using the username and password specified.  It then closes the socket.  Use this method to check the connectivity to the POP3 server before starting a mailing package.

IDL Definition

HRESULT CheckPOP3Password(
[in] BSTR bstrPOP3, 
[in] BSTR bstrAcct, 
[in] BSTR bstrPwd
);

Parameters

bstrPOP3

the name of the machine hosting the POP3 server.  This name must be a valid DNS name for a machine on the network.  The name is resolved to an IP address which is used to bind a TCP/IP socket to that machine using the default POP3 port 110.

bstrAcct

the USER value to present when authenticating.

bstrPwd

the PASS value to present when authenticating.

Return Values

the HRESULT can have one of the following values:

#define Name Description
S_OK success.
TMAIL_E_CONNECT_FAILED a TCP/IP connection could not be established with the target machine.

CheckKeywords

This method will check the keywords in the directory service.

IDL Definition

HRESULT CheckKeywords(
[in] BSTR bstrNDRKeys, 
[in] BSTR bstrUnsubKeys, 
[in] BSTR bstrRcptKeys
);

Parameters

bstrGUID

the GUID value for the package

bstrUnsubKeys

the list of “unsubscribe” keywords, separated by semi-colons

bstrRcptKeys

the list of

Return Values

a standard HRESULT value

CheckPath

This method attempts to create the directory specified by the value passed.  If successful, it removes the directory.  Use this method to make sure the directory does not already exist before starting a mail package.

IDL Definition

HRESULT CheckPath([in] BSTR bstrPath);

Parameters

BstrPath

The filesystem path to the directory.

Return Values

a standard HRESULT that can have the following special values:

#define name description
S_OK path is valid.
E_FAIL unspecified error
ERROR_ALREADY_EXISTS the directory already exists.

CreateInstance

This method creates an instance of the Direct Mail server and assigns the passed integer as the associated instance identifier.

IDL Definition

HRESULT CreateInstance([in] long lInst);

Parameters

lInst

The instance identifier to assign this instance.

Return Values

a standard HRESULT value

DeleteInstance

This method deletes the specified server instance.

IDL Definition

HRESULT DeleteInstance([in] long lInst);

Parameters

lInst

The instance identifier indicating the instance to delete.

Return Values

a standard HRESULT value

StopInstance

This method stops the indicated server instance.

IDL Definition

HRESULT StopInstance([in] long lInst);

Parameters

lInst

the instance identifier indicating the instance to stop.

Return Values

a standard HRESULT value

StartInstance

This method starts the specified server instance.

IDL Definition

HRESULT StartInstance([in] long lInst);

Parameters

lInst

the instance identifier indicating the instance to start.

Return Values

a standard HRESULT value

GetCurrentStatus Method

This method returns the status of the indicated Direct Mail server instance.

IDL Definition

HRESULT GetCurrentStatus(
[in] long lInst, 
[out] VARIANT *pStatus /* VT_I4 */
);

Parameters

lInst

the instance identifier indicating the instance to check.

pStatus

on return, an integer specifying the status.  The table below enumerates the possible return values

Typedef Meaning
VINST_STOPPED = 0 the instance is not running.
VINST_PAUSED = 1 the instance is idling.
VINST_STARTED = 2 the instance is running.

Return Values

a standard HRESULT value

SaveConfig

This method commits the current configuration in memory to the metabase.

IDL Definition

HRESULT SaveConfig(); 

Return Values

a standard HRESULT value

GetPeakMessageRate

This method returns the currently configured peak message delivery rate.

IDL Definition

HRESULT GetPeakMessageRate(
[out] VARIANT *rate, 
[out] VARIANT *time_start, 
[out] VARIANT *time_stop
);

Parameters

rate

the peak message rate in units of message per second

time_start

the time the delivery will begin

time_stop

the time the delivery will stop

Return Values

a standard HRESULT values

SetPeakMessageRate

This method can be used to configure the peak message delivery rate for a specified server instance.

IDL Definition

HRESULT SetPeakMessageRate(
[in] long rate, 
[in] long time_start, 
[in] long time_stop
);

Parameters

rate

the peak message rate in units of messages per second

time_start

the time the delivery will begin

time_stop

the time the delivery will stop

Return Values

a standard HRESULT value

Properties

CurrentInstance

This property is used to indicate the current Direct Mail server instance.  All configuration change subsequently made are applied to this instance.

Type

LONG

DSName

This property specifies the directory service name to use.

Type

BSTR

LDAPPort

This property specifies the TCP/IP port number for the LDAP service instance.

Type

LONG

DSAccount

This property specifies the account name used to authenticate to the LDAP service instance.

Type

BSTR

DSPassword

This property specifies the password to use when authenticating with the LDAP service instance.

Type

BSTR

SMTPServer

This property specifies the DNS name of the server hosting the SMTP service to use.

Type

BSTR

POP3Server

This property specifies the DNS name of the server hosting the POP3 service to use.

Type

BSTR

POP3Account

This property specifies the account name to present when authenticating with the POP3 service.

Type

BSTR

POP3Password

This property specifies the password to present when authenticating with the POP3 service.

Type

BSTR

NDRThreshold

This property specifies the number of failed deliveries can occur before the mailer stops attempting delivery.  (NDR is an acronym for Non-Delivered-Response)

Type

LONG

Default

3

NDRSubjectKeywords

This property is a comma-separated list of words used to identify subject lines in mail items that were undeliverable.

Type

BSTR

Default

"Undeliverable, nondeliverable, Nondelivery, Unable, Cannot, Return"

NDRRecipientKeywords

This property is a comma-separated list of words used when identifying the recipient line in mail items that were undeliverable.

Type

BSTR

Default

" To, Delivery-To"

UnSubKeywords

This property is a comma-separated list of words used to identify "unsubscribe" directives from users in the body of mail messages.

Type

BSTR

Default

" Cancel, UnSubscribe"

LogPath

This property specifies the file system path to the directory that the instance will write the log file for mailings.

Type

BSTR

LogType

This property specifies the type of log to generate for mailings.

Type

LONG

Values

The statement below lists the typedef enum statement defining the possible values.

typedef enum tagLOGTYPE {
DAILY_LOG = 0,
WEEKLY_LOG = 1,
MONTHLY_LOG = 2,
SIZE_LIMITED = 3
} LOGTYPE;

LogFileName

This read-only property specifies the log file name for this instance's mailings log.

Type

VARIANT (VT_BSTR)

LogAutoNew

This property specifies whether new log files should automatically be created when the current one has reached a certain size.  0 = False, 1 = True

Type

BOOL

Values

1=TRUE, 0=FALSE

LogSize

This property specifies the maximum size, in megabytes, the mailings log file can reach before another file is started.  This property is used only if the LogType property is set to SIZE_LIMITED.

Type

LONG

LogNDR

This property specifies whether to log undeliverable mailing attempts.

Type

BOOL

Values

1=TRUE,0=FALSE

LogUnSub

This property specifies whether to log unsubscribe messages received.

Type

BOOL

Values

1=TRUE,0=FALSE

AutoDeleteNDR

This property specifies whether to delete non-deliverable returned messages after they are processed.

Type

BOOL

Values

1=TRUE,0=FALSE

AutoDeleteUnSub

This property specifies whether to delete "unsubscribe" messages after they are processed.

Type

BOOL

Values

1=TRUE,0=FALSE

RestOfDayMessageRate

This property specifies the message delivery rate.  The rate is expressed as the number of messages delivered per second.  (e.g. 2 = 2 messages per second)

This property is global, and is thus set for all server instances.

Type

LONG


© 1997-2000 Microsoft Corporation. All rights reserved.