Tabnine Logo
EmailNotification.getSubject
Code IndexAdd Tabnine to your IDE (free)

How to use
getSubject
method
in
com.ning.billing.overdue.EmailNotification

Best Java code snippets using com.ning.billing.overdue.EmailNotification.getSubject (Showing top 2 results out of 315)

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);
  }
}
origin: com.ning.billing/killbill-overdue

Assert.assertEquals(secondNotification.getSubject(), "ToTo");
Assert.assertEquals(secondNotification.getTemplateName(), "Titi");
Assert.assertFalse(secondNotification.isHTML());
com.ning.billing.overdueEmailNotificationgetSubject

Popular methods of EmailNotification

  • getTemplateName
  • isHTML

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now