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