Reading a specific message

You can read a specific message by passing its message identifier to xp_readmail.

To read the first message in the inbox, or the first unread message, depending upon the unread_only parameter, do not specify a message identifier.

xp_readmail places the contents of the message in its message output parameter.

Other output parameters that store the remaining attributes of the message include originator (message sender), date_received (message received date), subject (message subject), and recipients (message addressees).