Skip to content

Commit

Permalink
Require Bundle javax.mail
Browse files Browse the repository at this point in the history
When working with Emails in a plugin, a `MessagingException`must be caught. Include the bundle that contains this exception by default.

```java

    IMailerService mailerService = getService(IMailerService.class);
    MailSender sender = mailerService.getDefaultSender();
    if (mailerService.isMailEnabled()) {
      try {
        for (String mailAddress : mailAddresses) {
          mailerService.sendMail(sender, mailAddress, "subject", "body", null);
        }
      } catch (MessagingException e) {
        throw new TeamRepositoryException(e.getMessage());
      }

```
  • Loading branch information
Lukas Steiger authored Apr 5, 2019
1 parent ab3c2d1 commit 72e066f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Require-Bundle:
com.hp.hpl.jena,
javax.xml.stream,
javax.xml,
javax.mail,
org.apache.log4j,
com.ibm.icu,
org.apache.commons.codec,
Expand Down

0 comments on commit 72e066f

Please sign in to comment.