ArrayList userMails = dao.getUserEmails();
Iterator it = userMails.iterator();
BanGuard guard = BanGuard.getInstance();
while (it.hasNext()) {
NamedValue nv = (NamedValue) it.next();
if (!guard.checkBan(nv.getValue(), BanType.EMAIL)
&& !user.getName().equals(nv.getName())) {
messArgs[0] = nv.getName();
queue.push(new MailMessage(messages.getMessage(
"mails.ADMIN_MAIL", messArgs),
samForm.getSubject(), Configurator.getInstance()
.get(IConst.CONFIG.ADMINMAIL), user
.getName(), nv.getValue(), nv.getName()));
}
}
request.removeAttribute("sendAdminMailForm");
log(request, "status.ADMIN_MAIL_SENT");
setStatusMessage(request, "status.ADMIN_MAIL_SENT");