(Windows only) Retrieves the next message identifier from the SAP ASE message inbox.
xp_findnextmsg @msg_id = @msg_id output[, type] [, unread_only = {true | false}]
true (default) – xp_findnextmsg considers only unread messages.
false – xp_findnextmsg considers all messages, both read and unread, when retrieving the next message identifier.
xp_findnextmsg @msg_id = @out_msg_id output
xp_findnextmsg @msg_id = @out_msg_id output, NULL, @unread_only = false
When xp_findnextmsg can find no more messages in the inbox, it returns a status of 1.
xp_deletemail and xp_readmail use the message identifier returned by xp_findnextmsg.
By default, only a system administrator can execute xp_findnextmsg. A system administrator can grant this permission to other users.