Hi,At the end I've managed to get the subject line into a variable by doing this:instance.vars.subjLine = sqlGetString("select substring(dl.mdata,position('<subject><![CDATA[' in dl.mdata)+18,position(']]></subject>' in dl.mdata)-position('<subject><![CDATA[' in dl.mdata)-18 ) from nmsdelivery dl wh...