mailSaveMessage – PB Docs 126

mailSaveMessage PowerScript function

Description

Creates a new message in the user’s inbox or replaces
an existing message.

Controls

mailSession object

Syntax

Argument

Description

mailsession

A mailSession object identifying the
session in which you want to save the mail message.

messageid

A string whose value is the message ID
of the message being replaced. If you are saving a new message,
specify an empty string (“”).

mailmessage

A mailMessage structure containing the
message being saved.

Return Values

mailReturnCode. Returns one of the following values:

  • mailReturnSuccess!

  • mailReturnFailure!

  • mailReturnInsufficientMemory!

  • mailReturnInvalidMessage!

  • mailReturnUserAbort!

  • mailReturnDiskFull!

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

Usage

Before saving a message, you must address the message even
if you are replacing an existing message. The message can be addressed
to someone else for sending later.

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

Examples

This example creates a new message in the inbox of
the current user, which will be sent later to Jerry Smith. The application
has already created the mailSession object mSes and
logged on:

This example replaces the last message in the user
Jane Smith’s inbox. It gets the message ID from the MessageID
array in the mailSession object mSes. It changes
the message subject, re-addresses the message to the user, and saves the
message. The application has already created the mailSession object mSes and
logged on:

See also the mail examples in the samples that are supplied
with PowerBuilder.

See Also


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