Use the old way, this is, create a regular button and on the click event use something like this:var oDoc = event.target;oDoc.mailDoc({bUI: true,cTo: "aa@bb.cc",cCC: "11@22.33",cSubject: "TEXT " + field.rawValue + " more text",cMsg: "PDF IN ATTACH."});