Xpages error sending email from application -
in of document in application have button sends email document email in input field.
it worked, reason, don't know why, not working anymore.
this ssjs have in button onclick method:
if(docinfo.isnewnote()){ docinfo.save(); } var thisdoc = docinfo.getdocument(true); var tempdoc = database.createdocument(); tempdoc.replaceitemvalue("form", "memo"); tempdoc.replaceitemvalue("sendto", thisdoc.getitemvalue("destinatar")); tempdoc.replaceitemvalue("subject", "title"); var tempbody:notesrichtextitem = tempdoc.createrichtextitem("corp"); thisdoc.save(true,true); tempbody.appendtext("some text:") tempbody.addnewline(2); tempbody.appendtext(facescontext.getexternalcontext().getrequest().getrequesturl().tostring() + "?action=readdocument&documentid=" + thisdoc.getuniversalid()); tempdoc.send(); thisdoc.recycle(); tempbody.recycle(); tempdoc.recycle();
for reason error @ tempdoc.send()
says:
error while executing javascript action expression script interpreter error, line=21, col=17: [typeerror] exception occurred calling method notesdocument.send() null
it's worth checking sendto has value. usual cause doc.send()
failing.
Comments
Post a Comment