Class Mail
java.lang.Object
org.springframework.integration.mail.dsl.Mail
public final class Mail extends Object
The factory for Spring Integration Mail components.
- Since:
- 5.0
- Author:
- Gary Russell, Artem Bilan
-
Method Summary
-
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:
MailSendingMessageHandlerSpec.javaMailProperties(java.util.Properties)
-
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.
-