/** * Factory for the {@link Pop3MailInboundChannelAdapterSpec} * @param host the POP3 host * @param port the POP3 port * @param username the user name to connect to POP3 * @param password the password to connect to POP3 * @return Pop3MailInboundChannelAdapterSpec instance */ public Pop3MailInboundChannelAdapterSpec pop3(String host, int port, String username, String password) { return Mail.pop3InboundAdapter(host, port, username, password); }
/** * Factory for the {@link Pop3MailInboundChannelAdapterSpec} * @return Pop3MailInboundChannelAdapterSpec instance */ public Pop3MailInboundChannelAdapterSpec pop3() { return Mail.pop3InboundAdapter(); }
/** * Factory for the {@link Pop3MailInboundChannelAdapterSpec} * @param host the POP3 host * @param port the POP3 port * @param username the user name to connect to POP3 * @param password the password to connect to POP3 * @return Pop3MailInboundChannelAdapterSpec instance */ public Pop3MailInboundChannelAdapterSpec pop3(String host, int port, String username, String password) { return Mail.pop3InboundAdapter(host, port, username, password); }
/** * Factory for the {@link Pop3MailInboundChannelAdapterSpec} * @param url the POP3 url * @return Pop3MailInboundChannelAdapterSpec instance */ public Pop3MailInboundChannelAdapterSpec pop3(String url) { return Mail.pop3InboundAdapter(url); }
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String host, String username, String password) { return pop3InboundAdapter(host, -1, username, password); }
/** * Factory for the {@link Pop3MailInboundChannelAdapterSpec} * @return Pop3MailInboundChannelAdapterSpec instance */ public Pop3MailInboundChannelAdapterSpec pop3() { return Mail.pop3InboundAdapter(); }
/** * Factory for the {@link Pop3MailInboundChannelAdapterSpec} * @param url the POP3 url * @return Pop3MailInboundChannelAdapterSpec instance */ public Pop3MailInboundChannelAdapterSpec pop3(String url) { return Mail.pop3InboundAdapter(url); }
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String host, String username, String password) { return pop3InboundAdapter(host, -1, username, password); }
@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(); }