1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.service.impl;
17
18 import javax.mail.MessagingException;
19
20 import org.kuali.rice.core.api.mail.MailMessage;
21 import org.kuali.rice.core.api.mail.Mailer;
22 import org.kuali.rice.krad.exception.InvalidAddressException;
23 import org.kuali.rice.krad.service.MailService;
24
25 public class MailServiceImpl implements MailService {
26 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(MailServiceImpl.class);
27
28 private String batchMailingList;
29 private Mailer mailer;
30
31
32
33
34 public void setMailer(Mailer mailer) {
35 this.mailer = mailer;
36 }
37
38
39
40
41 public MailServiceImpl() {
42 super();
43 }
44
45
46
47
48
49 public void setBatchMailingList(String batchMailingList) {
50 this.batchMailingList = batchMailingList;
51 }
52
53
54
55
56 public String getBatchMailingList() {
57 return batchMailingList;
58 }
59
60
61
62
63
64
65
66 @Override
67 public void sendMessage(MailMessage message) throws InvalidAddressException, MessagingException {
68 mailer.sendEmail(message);
69 }
70 }