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