Raja
Raja

Reputation: 11

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

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(); 

Upvotes: 0

Views: 173

Answers (2)

Fredrik Norling
Fredrik Norling

Reputation: 3484

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

Upvotes: 1

Paul Stephen Withers
Paul Stephen Withers

Reputation: 15729

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.

Upvotes: 0

Related Questions