Xpage MIME mail Send- Error - method NotesDocument.send() null

假如想象 提交于 2020-01-03 05:25:26

问题


Mail Send Error : Exception occurred calling method NotesDocument.send() null

While making the mime mail in ssjs I am having this issue, but in the Lotus script client, I am getting mime emails correctly. Please help

var docEmail:NotesDocument = database.createDocument();

var rtitem:NotesRichTextItem = docEmail.createRichTextItem("Body");

docEmail.replaceItemValue("Form", "Memo");

docEmail.replaceItemValue("SendTo", "mailid.com");

docEmail.replaceItemValue("Subject", "Your Subject");

rtitem.appendText("Some text here... ");

rtitem.addNewLine(2);

rtitem.appendText("Click here to view the document => ");

//rtitem.appendDocLink(doc, "Some comment text");

rtitem.addNewLine(2);

docEmail.send(); 

回答1:


Problem could be that the user that is sending the email doesn't have a mailbox on the server or the path is wrong. I don't know if this has effect on XPages but is does on Agents adding this to Notes.ini or you could try to use SessionasSigner instead.

AMgr_DisableMailLookup=1




回答2:


This is sending a Rich Text email, not a MIME email. If you want to send MIME emails in SSJS, look at this XSnippet https://openntf.org/XSnippets.nsf/snippet.xsp?id=create-html-mails-in-ssjs-using-mime.

If you want "doc links" you can generate an HTML link with the relevant URL. To open it in Notes, use notes://serverName/dbPath/designElement.

I'm not sure if you're including everything in the question, but the sendTo address is not a valid email address there. I assume you've not included everything, but that would definitely cause it to fail.



来源:https://stackoverflow.com/questions/46262769/xpage-mime-mail-send-error-method-notesdocument-send-null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!