Hi guys i am working on sending an email in lotus notes through java.I am able to send an email.For external attachments i am constructing an rich text item.but i am not getting how to deal with inline attachments such as an image inside a mail body part. Here is the code i am using.thanks
Document doc = null;
RichTextItem rti = null;
try{
doc = db.createDocument();
doc.replaceItemValue(ServiceConstants.FROM,getFrom() );
doc.replaceItemValue(ServiceConstants.FORM, getForm());
doc.replaceItemValue(ServiceConstants.SUBJECT, getSubject());
doc.replaceItemValue(ServiceConstants.SENDTO,asVector(getSendTo()));
doc.replaceItemValue(ServiceConstants.COPYTO,asVector(getCopyTo()));
doc.replaceItemValue("Principal",getFrom());
rti = doc.createRichTextItem(ServiceConstants.BODY);
rti.appendText(getBody());
if ((getAttachment() != null) && (getAttachment().length > 0)) {
for (int i=0; i<getAttachment().length; i++) {
getAttachment()[i].save(rti);
}
}
doc.save();
if (send) {
doc.send();
}