Class MailSendingMessageHandlerSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<MailSendingMessageHandlerSpec,MailSendingMessageHandler>
org.springframework.integration.mail.dsl.MailSendingMessageHandlerSpec
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<MailSendingMessageHandler>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
public class MailSendingMessageHandlerSpec
extends org.springframework.integration.dsl.MessageHandlerSpec<MailSendingMessageHandlerSpec,MailSendingMessageHandler>
- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.mail.javamail.JavaMailSenderImplFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, targetFields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncredentials(String username, String password) Set the credentials.defaultEncoding(String defaultEncoding) Set the default encoding.defaultFileTypeMap(jakarta.activation.FileTypeMap defaultFileTypeMap) Set the default type map.javaMailProperties(Consumer<org.springframework.integration.support.PropertiesBuilder> propertiesConfigurer) Set aConsumerthat will be invoked with aPropertiesBuilder; most often used with a lambda expression.javaMailProperties(Properties javaMailProperties) Set the javamail properties.Set the mail user password.port(int port) Set the port.Set the protocol.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
sender
protected final org.springframework.mail.javamail.JavaMailSenderImpl sender
-
-
Constructor Details
-
MailSendingMessageHandlerSpec
-
-
Method Details
-
javaMailProperties
Set the javamail properties.- Parameters:
javaMailProperties- the properties.- Returns:
- the spec.
- See Also:
-
JavaMailSenderImpl.setJavaMailProperties(Properties)
-
javaMailProperties
public MailSendingMessageHandlerSpec javaMailProperties(Consumer<org.springframework.integration.support.PropertiesBuilder> propertiesConfigurer) Set aConsumerthat will be invoked with aPropertiesBuilder; most often used with a lambda expression.- Parameters:
propertiesConfigurer- the consumer.- Returns:
- the spec.
-
protocol
Set the protocol.- Parameters:
protocol- the protocol.- Returns:
- the spec.
- See Also:
-
JavaMailSenderImpl.setProtocol(String)
-
port
Set the port.- Parameters:
port- the port.- Returns:
- the spec.
- See Also:
-
JavaMailSenderImpl.setPort(int)
-
credentials
public MailSendingMessageHandlerSpec credentials(@Nullable String username, @Nullable String password) Set the credentials.- Parameters:
username- the user name.password- the password.- Returns:
- the spec.
- See Also:
-
JavaMailSenderImpl.setUsername(String)JavaMailSenderImpl.setPassword(String)
-
password
Set the mail user password. A convenient method whenusernameis provided in the Java mail properties.- Parameters:
password- the password.- Returns:
- the spec.
- Since:
- 5.1.3
- See Also:
-
JavaMailSenderImpl.setPassword(String)javaMailProperties(Properties)
-
defaultEncoding
Set the default encoding.- Parameters:
defaultEncoding- the default encoding.- Returns:
- the spec.
- See Also:
-
JavaMailSenderImpl.setDefaultEncoding(String)
-
defaultFileTypeMap
public MailSendingMessageHandlerSpec defaultFileTypeMap(@Nullable jakarta.activation.FileTypeMap defaultFileTypeMap) Set the default type map.- Parameters:
defaultFileTypeMap- the default type map.- Returns:
- the spec.
- See Also:
-
JavaMailSenderImpl.setDefaultFileTypeMap(FileTypeMap)
-