Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » QAnywhere » QAnywhere API Reference » QAnywhere SQL API reference » Message properties, headers, and content » Message headers

 

ml_qa_getreplytoaddress

Returns the address to which a reply to this message should be sent.

Parameters
Item Description Remarks
1 Message ID VARCHAR(128). You can obtain the message ID from ml_qa_createmessage or ml_qa_getmessage.
Return value

The reply address as VARCHAR(128).

Remarks

You can read this header after a message is received and until a rollback or commit occurs; after that you cannot read it.

See also
Example

In the following example, if the received message has a reply-to address, then a message is sent to the reply-to-address with the content 'message received':

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