コード例 #1
0
 protected Multipart createContent(Map<String, Object> context, SavedSearchType type) {
   try {
     if (type.equals(SavedSearchType.JOURNAL_ALERT)) {
       return mailer.createContent(this.alertTextEmail, this.alertHtmlEmail, context);
     } else {
       return mailer.createContent(this.savedSearchTextEmail, this.savedSearchHtmlEmail, context);
     }
   } catch (IOException ex) {
     throw new RuntimeException(ex);
   } catch (MessagingException ex) {
     throw new RuntimeException(ex);
   }
 }