◆ MailQueueItem()
org.turro.mail.pool.MailQueueItem.MailQueueItem |
( |
MailMessage |
mail, |
|
|
Consumer |
onFinish |
|
) |
| |
◆ send()
void org.turro.mail.pool.MailQueueItem.send |
( |
| ) |
|
Definition at line 45 of file MailQueueItem.java.
46 if(mail ==
null)
return;
49 Logger.getLogger(
MailQueueItem.class.getName()).log(Level.INFO,
"Sent mail from {0} to {1}. Subject: {2}",
50 new Object[]{mail.getEmail().getFromAddress().getAddress(),
51 InternetAddress.toString((InternetAddress[]) mail.getEmail().getToAddresses()
52 .toArray(new InternetAddress[0])), mail.getSubject()});
53 }
catch (MalformedURLException | NamingException | EmailException ex) {
54 Logger.getLogger(
MailQueueItem.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
"Sending"), ex);
56 if(onFinish !=
null) {
58 onFinish.accept(mail);
59 }
catch (Exception ex) {
60 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: