ml_qa_setinreplytoid

Sets the in-reply-to ID of this message.

Parameters
Item Description Remarks
1 Message ID VARCHAR(128). You can obtain the message ID from ml_qa_createmessage or ml_qa_getmessage.
2 in-reply-to ID VARCHAR(128)
Remarks

An in-reply-to ID is similar to the in-reply-to IDs that are used by email systems to track replies.

Typically you set the in-reply-to ID to be the message ID of the message to which this message is replying, if any.

A client can use the InReplyToID header field to link one message with another. A typical use is to link a response message with its request message.

You cannot alter this header after the message has been sent.

See also
Example

In the following example, when a message is received that contains a reply-to-address, a reply message is created and sent containing the message ID in the in-reply-to-id:

begin
    declare @msgid varchar(128);
    declare @rmsgid varchar(128);
    declare @replyaddr varchar(128);
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @replyaddr = ml_qa_getreplyaddress( @msgid );
    if @replyaddr is not null then
        set @rmsgid = ml_qa_createmessage();
        call ml_qa_settextcontent( @rmsgid, 'message received' );
        call ml_qa_setinreplytoid( @rmsgid, @msgid );
        call ml_qa_putmessage( @rmsgid, @replyaddr );
    end if;
    commit;
end