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
AMailSendingMessageHandlerSpecfactory. Note: the Java Mail properties must be provided with the particular host.- Returns:
- the
MailSendingMessageHandlerSpecinstance. - Since:
- 5.1.3
- See Also:
MailSendingMessageHandlerSpec.javaMailProperties(java.util.Properties)
-
outboundAdapter
AMailSendingMessageHandlerSpecfactory based on providehost.- Parameters:
host- the mail host to connect to.- Returns:
- the
MailSendingMessageHandlerSpecinstance.
-
outboundAdapter
A convenient factory method to produceMailSendingMessageHandlerbased on providedMailSender.- Parameters:
mailSender- theMailSenderto use mail sending operations.- Returns:
- the
MailSendingMessageHandlerinstance. - Since:
- 5.1.3
-
pop3InboundAdapter
APop3MailInboundChannelAdapterSpecfactory using a defaultPop3MailReceiver.- Returns:
- the
Pop3MailInboundChannelAdapterSpecinstance.
-
pop3InboundAdapter
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(Pop3MailReceiver pop3MailReceiver)APop3MailInboundChannelAdapterSpecfactory based on the providedPop3MailReceiver.- Parameters:
pop3MailReceiver- thePop3MailReceiverto use.- Returns:
- the
Pop3MailInboundChannelAdapterSpecinstance.
-
pop3InboundAdapter
APop3MailInboundChannelAdapterSpecfactory based on the provided url.- Parameters:
url- the pop3 url- Returns:
- the
Pop3MailInboundChannelAdapterSpecinstance.
-
pop3InboundAdapter
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String host, String username, String password)APop3MailInboundChannelAdapterSpecfactory based on the provided host, user, password and the default port.- Parameters:
host- the host.username- the user.password- the password.- Returns:
- the
Pop3MailInboundChannelAdapterSpecinstance.
-
pop3InboundAdapter
public static Pop3MailInboundChannelAdapterSpec pop3InboundAdapter(String host, int port, String username, String password)APop3MailInboundChannelAdapterSpecfactory based on the provided host, port, user, and password.- Parameters:
host- the host.port- the port.username- the user.password- the password.- Returns:
- the
Pop3MailInboundChannelAdapterSpecinstance.
-
imapInboundAdapter
AnImapMailInboundChannelAdapterSpecfactory using a defaultImapMailReceiver.- Returns:
- the
ImapMailInboundChannelAdapterSpecinstance.
-
imapInboundAdapter
public static ImapMailInboundChannelAdapterSpec imapInboundAdapter(ImapMailReceiver imapMailReceiver)AnImapMailInboundChannelAdapterSpecfactory based on the providedImapMailReceiver.- Parameters:
imapMailReceiver- theImapMailReceiverto use.- Returns:
- the
ImapMailInboundChannelAdapterSpecinstance.
-
imapInboundAdapter
AImapMailInboundChannelAdapterSpecfactory based on the provided url.- Parameters:
url- the imap url- Returns:
- the
ImapMailInboundChannelAdapterSpecinstance.
-
imapIdleAdapter
AnImapIdleChannelAdapterSpecfactory using a defaultImapMailReceiver.- Returns:
- the
ImapIdleChannelAdapterSpecinstance.
-
imapIdleAdapter
AImapIdleChannelAdapterSpecfactory based on the provided url.- Parameters:
url- the imap url- Returns:
- the
ImapIdleChannelAdapterSpecinstance.
-
imapIdleAdapter
AnImapIdleChannelAdapterSpecfactory based on the providedImapMailReceiver.- Parameters:
imapMailReceiver- theImapMailReceiverto use.- Returns:
- the
ImapIdleChannelAdapterSpecinstance.
-
headers
AMailHeadersBuilderfactory.- Returns:
- the factory.
-
toStringTransformer
AMailToStringTransformerfactory.- Returns:
- the transformer.
-
toStringTransformer
AMailToStringTransformerfactory.- Parameters:
charset- the charset to use when the default is not appropriate.- Returns:
- the transformer.
-