if(mailTemplate.getCpfrom()) {
ccIdentities.add(sender);
} else {
ccIdentities = null;
}
MailerResult mailerResult = mailer.sendMailUsingTemplateContext(identity, ccIdentities, null, mailTemplate, sender);
if (mailerResult.getReturnCode() == MailerResult.OK) {
// Email sended ok => set deleteEmailDate
for (Iterator groupIterator = ((List)identityGroupList.get(identity)).iterator(); groupIterator.hasNext();) {
BusinessGroup group = (BusinessGroup) groupIterator.next();
Tracing.logAudit("Group-Deletion: Delete-email send to identity=" + identity.getName() + " with email=" + identity.getUser().getProperty(UserConstants.EMAIL, null) + " for group=" + group, this.getClass());
markSendEmailEvent(group);