71 |
|
// set our sender |
72 |
|
smtp.setSender(cp.getProperty(_name, "Alerter.EMail.sender")); |
73 |
|
|
74 |
< |
// set the to list |
75 |
< |
StringTokenizer st = new StringTokenizer(cp.getProperty(_name, "Alerter.EMail.destList"), ";"); |
74 |
> |
// get the default destination list |
75 |
> |
String destList = cp.getProperty(_name, "Alerter.EMail.defaultDestList"); |
76 |
> |
// check if the source we're alerting about has a specific destination |
77 |
> |
String sourceDestList = cp.getProperty("Host."+alert.getSource(), "Alerter.EMail.destList"); |
78 |
> |
if(sourceDestList != null) { |
79 |
> |
// if there is a source destination list, use it |
80 |
> |
destList = sourceDestList; |
81 |
> |
} |
82 |
> |
|
83 |
> |
// set the to: list |
84 |
> |
StringTokenizer st = new StringTokenizer(destList, ";"); |
85 |
|
while (st.hasMoreTokens()) { |
86 |
|
smtp.setTo(st.nextToken()); |
87 |
|
} |