Class Mail
java.lang.Object
org.springframework.integration.mail.dsl.Mail
The factory for Spring Integration Mail components.
- Since:
- 5.0
- Author:
- Gary Russell, Artem Bilan
-
Method Summary
Modifier and TypeMethodDescriptionstatic MailHeadersBuilder
headers()
AMailHeadersBuilder
factory.static ImapIdleChannelAdapterSpec
AnImapIdleChannelAdapterSpec
factory using a defaultImapMailReceiver
.static ImapIdleChannelAdapterSpec
imapIdleAdapter
(String url) AImapIdleChannelAdapterSpec
factory based on the provided url.static ImapIdleChannelAdapterSpec
imapIdleAdapter
(ImapMailReceiver imapMailReceiver) AnImapIdleChannelAdapterSpec
factory based on the providedImapMailReceiver
.AnImapMailInboundChannelAdapterSpec
factory using a defaultImapMailReceiver
.imapInboundAdapter
(String url) AImapMailInboundChannelAdapterSpec
factory based on the provided url.imapInboundAdapter
(ImapMailReceiver imapMailReceiver) AnImapMailInboundChannelAdapterSpec
factory based on the providedImapMailReceiver
.AMailSendingMessageHandlerSpec
factory.outboundAdapter
(String host) AMailSendingMessageHandlerSpec
factory based on providehost
.static MailSendingMessageHandler
outboundAdapter
(MailSender mailSender) A convenient factory method to produceMailSendingMessageHandler
based on providedMailSender
.APop3MailInboundChannelAdapterSpec
factory using a defaultPop3MailReceiver
.pop3InboundAdapter
(String url) APop3MailInboundChannelAdapterSpec
factory based on the provided url.pop3InboundAdapter
(String host, int port, String username, String password) APop3MailInboundChannelAdapterSpec
factory based on the provided host, port, user, and password.pop3InboundAdapter
(String host, String username, String password) APop3MailInboundChannelAdapterSpec
factory based on the provided host, user, password and the default port.pop3InboundAdapter
(Pop3MailReceiver pop3MailReceiver) APop3MailInboundChannelAdapterSpec
factory based on the providedPop3MailReceiver
.static MailToStringTransformer
AMailToStringTransformer
factory.static MailToStringTransformer
toStringTransformer
(String charset) AMailToStringTransformer
factory.
-
Method Details
-
outboundAdapter
AMailSendingMessageHandlerSpec
factory. Note: the Java Mail properties must be provided with the particular host.- Returns:
- the
MailSendingMessageHandlerSpec
instance. - Since:
- 5.1.3
- See Also:
-
outboundAdapter
AMailSendingMessageHandlerSpec
factory based on providehost
.- Parameters:
host
- the mail host to connect to.- Returns:
- the
MailSendingMessageHandlerSpec
instance.
-
outboundAdapter
A convenient factory method to produceMailSendingMessageHandler
based on providedMailSender
.- Parameters:
mailSender
- theMailSender
to use mail sending operations.- Returns:
- the
MailSendingMessageHandler
instance. - Since:
- 5.1.3
-
pop3InboundAdapter
APop3MailInboundChannelAdapterSpec
factory using a defaultPop3MailReceiver
.- Returns:
- the
Pop3MailInboundChannelAdapterSpec
instance.
-
pop3InboundAdapter
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(Pop3MailReceiver pop3MailReceiver) APop3MailInboundChannelAdapterSpec
factory based on the providedPop3MailReceiver
.- Parameters:
pop3MailReceiver
- thePop3MailReceiver
to use.- Returns:
- the
Pop3MailInboundChannelAdapterSpec
instance.
-
pop3InboundAdapter
APop3MailInboundChannelAdapterSpec
factory based on the provided url.- Parameters:
url
- the pop3 url- Returns:
- the
Pop3MailInboundChannelAdapterSpec
instance.
-
pop3InboundAdapter
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String host, String username, String password) APop3MailInboundChannelAdapterSpec
factory based on the provided host, user, password and the default port.- Parameters:
host
- the host.username
- the user.password
- the password.- Returns:
- the
Pop3MailInboundChannelAdapterSpec
instance.
-
pop3InboundAdapter
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String host, int port, String username, String password) APop3MailInboundChannelAdapterSpec
factory based on the provided host, port, user, and password.- Parameters:
host
- the host.port
- the port.username
- the user.password
- the password.- Returns:
- the
Pop3MailInboundChannelAdapterSpec
instance.
-
imapInboundAdapter
AnImapMailInboundChannelAdapterSpec
factory using a defaultImapMailReceiver
.- Returns:
- the
ImapMailInboundChannelAdapterSpec
instance.
-
imapInboundAdapter
public static ImapMailInboundChannelAdapterSpec imapInboundAdapter(ImapMailReceiver imapMailReceiver) AnImapMailInboundChannelAdapterSpec
factory based on the providedImapMailReceiver
.- Parameters:
imapMailReceiver
- theImapMailReceiver
to use.- Returns:
- the
ImapMailInboundChannelAdapterSpec
instance.
-
imapInboundAdapter
AImapMailInboundChannelAdapterSpec
factory based on the provided url.- Parameters:
url
- the imap url- Returns:
- the
ImapMailInboundChannelAdapterSpec
instance.
-
imapIdleAdapter
AnImapIdleChannelAdapterSpec
factory using a defaultImapMailReceiver
.- Returns:
- the
ImapIdleChannelAdapterSpec
instance.
-
imapIdleAdapter
AImapIdleChannelAdapterSpec
factory based on the provided url.- Parameters:
url
- the imap url- Returns:
- the
ImapIdleChannelAdapterSpec
instance.
-
imapIdleAdapter
AnImapIdleChannelAdapterSpec
factory based on the providedImapMailReceiver
.- Parameters:
imapMailReceiver
- theImapMailReceiver
to use.- Returns:
- the
ImapIdleChannelAdapterSpec
instance.
-
headers
AMailHeadersBuilder
factory.- Returns:
- the factory.
-
toStringTransformer
AMailToStringTransformer
factory.- Returns:
- the transformer.
-
toStringTransformer
AMailToStringTransformer
factory.- Parameters:
charset
- the charset to use when the default is not appropriate.- Returns:
- the transformer.
-