+ if ("email".equals(type)) {
+ EmailAddress addr = EmailAddress.getById(Integer.parseInt(id));
+ subject = addr.getAddress();
+ target = addr;
+ } else if ("domain".equals(type)) {
+ Domain domain = Domain.getById(Integer.parseInt(id));
+ subject = domain.getSuffix();
+ target = domain;
+ }