/** * Closes session. */ @Override public void close() { try { service.close(); } catch (final MessagingException mex) { throw new MailException("Failed to close session", mex); } }
/** * Close the given JavaMail Service and ignore any thrown exception. This is useful for typical * <code>finally</code> * blocks in manual JavaMail code. * @param service the JavaMail Service to close (may be <code>null</code>) * @see javax.mail.Transport * @see javax.mail.Store */ public static void closeService(Service service) { if (service != null) { try { service.close(); } catch (MessagingException ex) { LOGGER.debug("Could not close JavaMail Service", ex); } } }
/** * Close the given JavaMail Service and ignore any thrown exception. This is useful for typical {@code finally} * blocks in manual JavaMail code. * * @param service the JavaMail Service to close (may be {@code null}) * @see Transport * @see Store */ public static void closeService(Service service) { if (service != null) { try { service.close(); } catch (MessagingException ex) { logger.debug("Could not close JavaMail Service", ex); } } }
/** * Close the given JavaMail Service and ignore any thrown exception. This is useful for typical {@code finally} * blocks in manual JavaMail code. * * @param service the JavaMail Service to close (may be {@code null}) * @see Transport * @see Store */ public static void closeService(Service service) { if (service != null) { try { service.close(); } catch (MessagingException ex) { logger.debug("Could not close JavaMail Service", ex); } } }
/** * Close the given JavaMail Service and ignore any thrown exception. This is useful for typical <code>finally</code> * blocks in manual JavaMail code. * * @param service the JavaMail Service to close (may be <code>null</code>) * @see javax.mail.Transport * @see javax.mail.Store */ public static void closeService(Service service) { if (service != null) { try { service.close(); } catch (MessagingException ex) { logger.debug("Could not close JavaMail Service", ex); } } }
/** * Close the given JavaMail Service and ignore any thrown exception. This is useful for typical {@code finally} * blocks in manual JavaMail code. * * @param service the JavaMail Service to close (may be {@code null}) * @see Transport * @see Store */ public static void closeService(Service service) { if (service != null) { try { service.close(); } catch (MessagingException ex) { logger.debug("Could not close JavaMail Service", ex); } } }
/** * Closes session. */ @Override public void close() { try { service.close(); } catch (final MessagingException mex) { throw new MailException("Failed to close session", mex); } }