GetEmailCount method: MCFGetMail class

Syntax

GetEmailCount(user, password, server, node)

Description

Use GetEmailCount to determine the number of emails currently stored in a particular email account. GetEmailCount does not distinguish between read and unread email. You can use this value to set limits on loops in your program.

If you want to determine the number of emails for an account using the connection properties set with SetMCFEmail, use the GetCount method instead.

Parameters

Parameter Description

user

The user name on the mail server, such as “support” or “john_doe”.

password

The password associated with the specified user name.

server

The name of the mail server handling the specified user account.

node

The Integration Broker node on which the request runs.

Note:

If the value of any of these parameters is null, the method uses default values stored on the specified node. If the node is not specified, Integration Broker returns an error.

Returns

Returns the total number of emails stored on the mail server for a particular email account. If the method returns –4, the system could not connect to the mail server using the user name and password passed in the parameter list.

Example

Local number &email_count;

&email_count = &gm.GetEmailCount(&username, &passwd, &mailserver,
&node);