◆ ContactQueueSender()
◆ doSend()
void org.turro.mail.queue.ContactQueueSender.doSend |
( |
| ) |
|
|
protected |
Reimplemented from org.turro.mail.queue.QueuedSender.
Definition at line 62 of file ContactQueueSender.java.
63 IAgreements agreements = Plugins.loadImplementation(IAgreements.class,
"agreements");
64 for(String category : cm.keySet()) {
65 NotificationCategory nc = Notifications.getCategory(category);
67 if(agreements.canSendEmails(nc)) {
70 MailItemSet mis = cm.get(category);
71 MailMessagePool pool = MailProviders.instance().getPool(constructor, Strings.isBlank(mis.getPoolName(), MailProviders.GENERIC));
73 MailMessageTemplate mmt = MailMessageTemplate.of(pool.getProvider());
74 mmt.setRoot(
"/queue");
75 mmt.addTo(contact.getConnector(IUser.CONNECTOR_EMAIL), contact.getName());
77 ElephantMarker em =
new ElephantMarker(constructor,
true);
78 em.put(
"contact", contact);
79 em.put(
"messages", mis);
80 em.put(
"notifier",
this);
81 mmt.setMessage(em,
"messages", contact);
86 }
catch (EmailException | NullPointerException ex) {
87 Logger.getLogger(
ContactQueueSender.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
91 agreements.sendIfNecessary(constructor);
92 if(agreements.declinedNotifications()) {
void removeMails(QueuePeriod period, String idContact, String idCategory)
◆ getReason()
String org.turro.mail.queue.ContactQueueSender.getReason |
( |
MailItem |
mailItem | ) |
|
Definition at line 116 of file ContactQueueSender.java.
117 return !Strings.isBlank(mailItem.getReason()) ? mailItem.getReason() : I_.get(
"Others");
◆ getSubject()
String org.turro.mail.queue.ContactQueueSender.getSubject |
( |
String |
category | ) |
|
Definition at line 99 of file ContactQueueSender.java.
100 return "[" + I_.get(category) +
" " + ElephantContext.getSiteName() +
"]";
◆ isReasonDifferent()
boolean org.turro.mail.queue.ContactQueueSender.isReasonDifferent |
( |
MailItem |
mailItem | ) |
|
Definition at line 106 of file ContactQueueSender.java.
107 int result = CompareUtil.compare(reason, mailItem.getReason());
108 reason = mailItem.getReason();
◆ isSubjectDifferent()
boolean org.turro.mail.queue.ContactQueueSender.isSubjectDifferent |
( |
MailItem |
mailItem | ) |
|
Definition at line 120 of file ContactQueueSender.java.
121 int result = CompareUtil.compareDate(itemDate, mailItem.getItemDate());
123 result = CompareUtil.compare(subject, mailItem.getSubject());
125 itemDate = mailItem.getItemDate();
126 subject = mailItem.getSubject();
The documentation for this class was generated from the following file: