Here is the code with SSJS:
//Create new mail document
var memo:NotesDocument = database.createDocument()
memo.replaceItemValue("Form","Memo");
memo.replaceItemValue("Principal",Sender_name);
mailSubject=PersonNm + " " + mailDoc.getItemValueString("subject")
//Append data from existing body field on the form.
memo.replaceItemValue("Subject", mailSubject);
var Body_MailDoc:NotesRichTextItem = mailDoc.getFirstItem("body")
var Body_Memo:NotesRichTextItem = memo.createRichTextItem("Body")
Body_Memo.appendRTItem(Body_MailDoc)
Body_Memo.addNewLine(2);
//GET THE SERVER NAME TO APPEND IN THE DOC URL
var serverName:NotesName = session.createName(db.getServer());
var strReplace = db;
strReplace = @ReplaceSubstring(strReplace,"\\","/");
//URL Construction using the Universal ID of the document
var url:String = "http://"+serverName.getCommon()+"/"+strReplace+"/"+"Name of xpage.xsp?documentId="+@Text(docID) +"&action=editDocument"
Body_Memo.addNewLine();
Body_Memo.appendText(url)
memo.replaceItemValue("CopyTo",Cpyto);
memo.send(sendTo)
Hope this helps!!!
Regards,
Pranesh Vaidya