Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

mailGetMessages – PB Docs 2022 – PowerBuilder Library

mailGetMessages – PB Docs 2022

mailGetMessages

PowerScript function

Description

Populates the messageID array of a mailSession object with the
message IDs in the user’s inbox.

Applies to

mailSession object

Syntax

Argument

Description

mailsession

A mailSession object identifying the session in which you
want to get the messages.

messagetype (optional)

A string whose value is a message type. The default
message type is IPM or an empty string (“”), which identifies
interpersonal messages. The other standard type is IPC, which
identifies hidden, interprocess messages. Your mail
administrator may have established other user-defined message
types.

unreadonly (optional)

A boolean value indicating you want only the IDs of unread
messages. Values are:

  • TRUE — Get IDs for unread messages only

  • FALSE — Get IDs for all messages

Return value

mailReturnCode. Returns one of the following values:

mailReturnSuccess!

mailReturnFailure!

mailReturnInsufficientMemory!

mailReturnNoMessages!

mailReturnUserAbort!

If any argument’s value is null, mailGetMessages returns
null.

Usage

MailGetMessages only retrieves message IDs, which it stores in the
mailSession object’s MessageID array. A message ID serves as an argument
for other mail functions. With mailReadMessage, for example, it identifies
the message you want to read.

Before calling mail functions, you must declare and create a
mailSession object and call mailLogon to establish a mail session.

Examples

This example populates a DataWindow with the messages in the user’s
inbox. The DataWindow is defined with an external data source and has
three columns: msgid, msgdate, and msgsubject. MailGetMessages fills the
MessageID array in the mailSession object and mailReadMessage gets the
information for each ID.

The example assumes that the application has already created the
mailSession object mSes and logged on:

See also

mailDeleteMessage

mailReadMessage


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x