◆ SendAttachments()
org.turro.zkoss.contact.SendAttachments.SendAttachments |
( |
String |
title | ) |
|
◆ addAttachment()
void org.turro.zkoss.contact.SendAttachments.addAttachment |
( |
Object |
entity, |
|
|
String |
path, |
|
|
String |
name |
|
) |
| |
Definition at line 60 of file SendAttachments.java.
61 attachments.add(
new MailAttachment(path, name, entity));
◆ fillAttachment()
abstract void org.turro.zkoss.contact.SendAttachments.fillAttachment |
( |
File |
attachment, |
|
|
Object |
entity |
|
) |
| |
|
abstractprotected |
◆ sendAttachments()
void org.turro.zkoss.contact.SendAttachments.sendAttachments |
( |
Collection< IContact > |
contacts | ) |
throws IOException |
Definition at line 64 of file SendAttachments.java.
65 if(attachments.isEmpty()) {
68 IMailRecipients.selectRecipients(contacts,
new Command() {
70 public Object execute(Context context) {
71 IMailRecipients mr = (IMailRecipients) context.get(
"component");
72 Collection<IContact> contacts = mr.getRecipients();
73 if(contacts !=
null) {
74 String mailString = getMailString(contacts);
75 if(!Strings.isBlank(mailString)) {
76 for(MailAttachment ma : attachments) {
78 ma.attachment = File.createTempFile(
"attach_",
"_mail");
80 }
catch (IOException ex) {
81 Logger.getLogger(
SendAttachments.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(mailString), ex);
84 sendAttachments(contacts, attachments, IMailRecipients.getComment(), mailString, (m) -> {
85 for(MailAttachment ma : attachments) {
86 ma.attachment.delete();
87 SystemLogger.getInstance().doLog(SystemLogType.LOG_INFO, ma.path,
"sent", mailString);
The documentation for this class was generated from the following file: