2

こんにちは、Java を介してロータス ノートでメールを送信する作業を行っています。メールを送信できます。外部添付ファイルについては、リッチ テキスト アイテムを作成しています。メール本文部分。ここに私が使用しているコードがあります.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();
}
4

1 に答える 1