/** * A {@link Pop3MailInboundChannelAdapterSpec} factory based on the provided {@link Pop3MailReceiver}. * @param pop3MailReceiver the {@link Pop3MailReceiver} to use. * @return the {@link Pop3MailInboundChannelAdapterSpec} instance. * @since 1.2 */ public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(Pop3MailReceiver pop3MailReceiver) { return new Pop3MailInboundChannelAdapterSpec(pop3MailReceiver); }
@Bean public IntegrationFlow pop3MailFlow() { return IntegrationFlows .from(Mail.pop3InboundAdapter("localhost", pop3Server.getPort(), "user", "pw") .javaMailProperties(p -> p.put("mail.debug", "false")) .headerMapper(mailHeaderMapper()), e -> e.autoStartup(true).poller(p -> p.fixedDelay(1000))) .enrichHeaders(s -> s.headerExpressions(c -> c.put(MailHeaders.SUBJECT, "payload.subject") .put(MailHeaders.FROM, "payload.from[0].toString()"))) .channel(MessageChannels.queue("pop3Channel")) .get(); }
/** * A {@link Pop3MailInboundChannelAdapterSpec} factory based on the provided {@link Pop3MailReceiver}. * @param pop3MailReceiver the {@link Pop3MailReceiver} to use. * @return the {@link Pop3MailInboundChannelAdapterSpec} instance. * @since 1.2 */ public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(Pop3MailReceiver pop3MailReceiver) { return new Pop3MailInboundChannelAdapterSpec(pop3MailReceiver); }
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String url) { return new Pop3MailInboundChannelAdapterSpec(url); }
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String host, int port, String username, String password) { return new Pop3MailInboundChannelAdapterSpec(host, port, username, password); }
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String host, int port, String username, String password) { return new Pop3MailInboundChannelAdapterSpec(host, port, username, password); }
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter() { return new Pop3MailInboundChannelAdapterSpec(); }
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String url) { return new Pop3MailInboundChannelAdapterSpec(url); }
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter() { return new Pop3MailInboundChannelAdapterSpec(); }