Exemplo n.º 1
0
 public static boolean sendEmail(String emailStr, String topic, String body) {
   Email email = Email.create(emailStr);
   if (!emailValidator.validate(email)) {
     return false;
   }
   return emailService.send(email, topic, body);
 }
Exemplo n.º 2
0
 public static ContactsBookPackage addEmail(String email) {
   if (emailValidator.validate(Email.create(email))) {
     return new EmailContactsBookPackage(email, personDAO);
   }
   return new NullContactsBookPackage();
 }