◆ MailQueueItem()
org.turro.mail.impl.MailQueueItem.MailQueueItem |
( |
MailMessage |
mail, |
|
|
Consumer |
onFinish |
|
) |
| |
◆ send()
void org.turro.mail.impl.MailQueueItem.send |
( |
| ) |
|
Definition at line 44 of file MailQueueItem.java.
45 if(mail ==
null)
return;
48 Logger.getLogger(MailQueueConsumer.class.getName()).log(Level.INFO,
"Sent mail from {0} to {1}. Subject: {2}",
49 new Object[]{mail.getEmail().getFromAddress().getAddress(),
50 InternetAddress.toString((InternetAddress[]) mail.getEmail().getToAddresses()
51 .toArray(new InternetAddress[0])), mail.getSubject()});
52 }
catch (MalformedURLException | NamingException | EmailException ex) {
53 Logger.getLogger(
MailQueueItem.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
"Sending"), ex);
55 if(onFinish !=
null) {
57 onFinish.accept(mail);
58 }
catch (Exception ex) {
59 Logger.getLogger(
MailQueueItem.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
"onFinish"), ex);
MailQueueItem(MailMessage mail, Consumer onFinish)
The documentation for this class was generated from the following file: