Revision 54959
Added by Argiro Kokogiannaki about 5 years ago
EmailSender.java | ||
---|---|---|
44 | 44 |
private static String host; |
45 | 45 |
private static String port; |
46 | 46 |
private static String from; |
47 |
private static String auth; |
|
47 | 48 |
private static String contactMail; |
48 | 49 |
private static String specialRecipients; |
49 | 50 |
|
... | ... | |
56 | 57 |
Date date = new Date(); |
57 | 58 |
String dateTo = (format.format(date)); |
58 | 59 |
|
59 |
defaultEmails_For_ProjectClaims(dateTo, format); // daily for managers not in notification table |
|
60 |
defaultEmails_For_CommunityClaims(dateTo, format); // daily for managers not in notification table |
|
60 |
// defaultEmails_For_ProjectClaims(dateTo, format); // daily for managers not in notification table
|
|
61 |
// defaultEmails_For_CommunityClaims(dateTo, format); // daily for managers not in notification table
|
|
61 | 62 |
|
62 |
notificationEmails_For_ProjectClaims(dateTo, format); |
|
63 |
notificationEmails_For_CommunityClaims(dateTo, format); |
|
63 |
// notificationEmails_For_ProjectClaims(dateTo, format);
|
|
64 |
// notificationEmails_For_CommunityClaims(dateTo, format);
|
|
64 | 65 |
} |
65 | 66 |
|
66 | 67 |
public void defaultEmails_For_ProjectClaims(String dateTo, SimpleDateFormat format) { |
... | ... | |
396 | 397 |
Properties properties = System.getProperties(); |
397 | 398 |
properties.setProperty("mail.smtp.host", host); |
398 | 399 |
properties.put("mail.smtp.port", port); |
399 |
properties.put("mail.smtp.auth", "true"); //enable authentication
|
|
400 |
properties.put("mail.smtp.auth", auth); //enable authentication
|
|
400 | 401 |
properties.put("mail.smtp.starttls.enable", "true"); |
401 | 402 |
|
402 | 403 |
Session session = Session.getInstance(properties, |
... | ... | |
492 | 493 |
EmailSender.from = from; |
493 | 494 |
} |
494 | 495 |
|
496 |
public static String getAuth() { |
|
497 |
return auth; |
|
498 |
} |
|
499 |
|
|
500 |
public static void setAuth(String auth) { |
|
501 |
EmailSender.auth = auth; |
|
502 |
} |
|
503 |
|
|
495 | 504 |
public static void setContactMail(String contactMail) { EmailSender.contactMail = contactMail; } |
496 | 505 |
|
497 | 506 |
public static void setSpecialRecipients(String specialRecipients) { |
Also available in: Unified diff
[Trunk]
Email sEnder:
comment notification functions
add property for auth
read emailScheduler.sendEmailNotifications from properties