@Test public void sendSingleToAndCcBccEmail() { mailConfig.set("to", "bob@example.com") .set("bcc", ImmutableList.of("charlie@example.com")) .set("cc", ImmutableList.of("david@example.com")); Operator op = factory.newOperator(newContext( tempPath, newTaskRequest().withConfig(mailConfig))); op.run(); greenMail.waitForIncomingEmail(5000, 2); receiveCheck("bob@example.com", 1); receiveCheck("charlie@example.com", 1); receiveCheck("david@example.com", 1); }
@Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); }
MailOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); } }
MailOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); } @Inject  MailOperatorFactory(TemplateEngine templateEngine, Config systemConfig); }
MailOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); } @Inject  MailOperatorFactory(TemplateEngine templateEngine, Config systemConfig); String getType(); @Override Operator newOperator(OperatorContext context); }
MailOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); } @Inject  MailOperatorFactory(TemplateEngine templateEngine, Config systemConfig); String getType(); @Override Operator newOperator(OperatorContext context);  }