Codota Logo
OverdueEmailGenerator.generateEmail
Code IndexAdd Codota to your IDE (free)

How to use
generateEmail
method
in
com.ning.billing.overdue.applicator.OverdueEmailGenerator

Best Java code snippets using com.ning.billing.overdue.applicator.OverdueEmailGenerator.generateEmail (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: com.ning.billing/killbill-overdue

private void sendEmailIfRequired(final BillingState billingState, final Account account,
                 final OverdueState nextOverdueState, final InternalTenantContext context) {
  // Note: we don't want to fail the full refresh call because sending the email failed.
  // That's the reason why we catch all exceptions here.
  // The alternative would be to: throw new OverdueApiException(e, ErrorCode.EMAIL_SENDING_FAILED);
  // If sending is not configured, skip
  if (nextOverdueState.getEnterStateEmailNotification() == null) {
    return;
  }
  final List<String> to = ImmutableList.<String>of(account.getEmail());
  // TODO - should we look at the account CC: list?
  final List<String> cc = ImmutableList.<String>of();
  final String subject = nextOverdueState.getEnterStateEmailNotification().getSubject();
  try {
    // Generate and send the email
    final String emailBody = overdueEmailGenerator.generateEmail(account, billingState, account, nextOverdueState);
    if (nextOverdueState.getEnterStateEmailNotification().isHTML()) {
      emailSender.sendHTMLEmail(to, cc, subject, emailBody);
    } else {
      emailSender.sendPlainTextEmail(to, cc, subject, emailBody);
    }
  } catch (IOException e) {
    log.warn(String.format("Unable to generate or send overdue notification email for account %s and overdueable %s", account.getId(), account.getId()), e);
  } catch (EmailApiException e) {
    log.warn(String.format("Unable to send overdue notification email for account %s and overdueable %s", account.getId(), account.getId()), e);
  } catch (MustacheException e) {
    log.warn(String.format("Unable to generate overdue notification email for account %s and overdueable %s", account.getId(), account.getId()), e);
  }
}
com.ning.billing.overdue.applicatorOverdueEmailGeneratorgenerateEmail

Popular methods of OverdueEmailGenerator

    Popular in Java

    • Finding current android device location
    • setScale (BigDecimal)
    • onRequestPermissionsResult (Fragment)
    • orElseThrow (Optional)
    • Graphics2D (java.awt)
      This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
    • File (java.io)
      An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
    • String (java.lang)
    • LinkedHashMap (java.util)
      Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
    • Stack (java.util)
      The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
    • ExecutorService (java.util.concurrent)
      An Executor that provides methods to manage termination and methods that can produce a Future for tr
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now