m.setContent((String)_rbTE.build(MAIL_REGISTRATION_SUCCESSFUL, params));
return m;
}
public Mail createNewUserMailAdmin(User user) {
BasicMail m = new BasicMail();
m.setFrom(FROM_MAIL);
m.setTo(new String[] { FROM_MAIL });
m.setSubject("World Of Java : New user :" + user.getEmail());
Map params = new LinkedHashMap();
params.put("login", user.getLogin());
params.put("mail", user.getEmail());
String license = "";
if (user instanceof UserImpl) {
UserImpl userImpl = (UserImpl) user;
Set ls = userImpl.getBuyedLicenses();
if(ls != null) {
for (Iterator iter = ls.iterator(); iter.hasNext();) {
License l = (License) iter.next();
license += l.toString()+",";
}
}
}
params.put("license", license);
m.setContent((String) _rbTE.build(MAIL_NEW_USER_ADMIN, params));
return m;
}