protected void installEmailModule() { install(new EmailModule());}
install(new EventLogModule()); install(new CassandraRepositoryModule()); bind(Boolean.class).annotatedWith(named(EMAIL_SERVICE_ENABLED)) .toInstance(Boolean.valueOf(getProperty("email.service.enabled", properties, FALSE.toString()))); bind(String.class).annotatedWith(named(EMAIL_SERVICE_HOST)) .toInstance(getProperty("email.service.host", properties, "")); bind(String.class).annotatedWith(named(EMAIL_SERVICE_FROM)) .toInstance(getProperty("email.service.from", properties, "")); bind(String.class).annotatedWith(named(EMAIL_SERVICE_SUBJECT_PREFIX)) .toInstance(getProperty("email.service.subject.prefix", properties, "")); bind(String.class).annotatedWith(named(EMAIL_SERVICE_USERNAME)) .toInstance(getProperty("email.service.username", properties, "")); bind(String.class).annotatedWith(named(EMAIL_SERVICE_PASSWORD)) .toInstance(getProperty("email.service.password", properties, "")); bind(String.class).annotatedWith(named(EMAIL_SERVICE_AUTHENTICATION_ENABLED)) .toInstance(getProperty("email.service.authentication.enabled", properties, FALSE.toString())); bind(String.class).annotatedWith(named(EMAIL_SERVICE_SSL_ENABLED)) .toInstance(getProperty("email.service.ssl.enabled", properties, FALSE.toString())); bind(EmailTextProcessor.class).to(EmailTextProcessorImpl.class).in(SINGLETON); bind(EmailEventLogListener.class).asEagerSingleton(); bind(EmailService.class).to(emailServiceClass).in(SINGLETON); } catch (ClassNotFoundException e) { LOGGER.error("unable to find class: {}", emailServiceClassName, e);