-
Bug
-
Resolution: Fixed
-
Major
-
3.0.3
-
None
-
None
There's still a bug in that class when an email has to be sent to all members of a group.
The addresses are not separated properly with that \n character:
Look at the code:
...
else if (userName.startsWith(MailConstants.PREFIX_GROUP)) {
userName = StringUtils.removeStart(userName, MailConstants.PREFIX_GROUP);
try {
HierarchyManager hm = ContentRepository.getHierarchyManager(ContentRepository.USERS);
Collection users = hm.getRoot().getChildren(ItemType.USER);
Iterator iter = users.iterator();
while(iter.hasNext()){
Content userNode = ((Content) iter.next());
MgnlUserManager manager = new MgnlUserManager();
MgnlUser user = (MgnlUser) manager.getUser(userNode.getName());
if (user.getGroups().contains(userName))
{ ret.append(getUserMail(user.getName())); }
}
}
catch (Exception e)
}
...
the command
ret.append(getUserMail(user.getName()));
just concatinates the adresses. Therefore in the end you have just only one big WRONG email address like, e.g.:
username1@company.comusername2@company.comusername3@company.com
...and finally: it doesn't work!
- is superseded by
-
MAGNOLIA-1948 MgnlMailFactory can't read e-mail addresses of externally managed users
- Closed