/** * Construct the attachments object. */ public Attachments build() { Attachments attachments = new Attachments(); attachments.setContent(content); attachments.setFilename(fileName); attachments.setDisposition(disposition); attachments.setContentId(contentId); attachments.setType(type); return attachments; } }
/** * Add attachments to the email. * @param attachments attachments to add. */ public void addAttachments(Attachments attachments) { Attachments newAttachment = new Attachments(); newAttachment.setContent(attachments.getContent()); newAttachment.setType(attachments.getType()); newAttachment.setFilename(attachments.getFilename()); newAttachment.setDisposition(attachments.getDisposition()); newAttachment.setContentId(attachments.getContentId()); this.attachments = addToList(newAttachment, this.attachments); }