public class MailSendingMessageHandler
extends org.springframework.integration.handler.AbstractMessageHandler
MessageHandler implementation for sending mail.
If the Message is an instance of MailMessage, it will be passed
as-is. If the Message payload is a byte array, it will be passed as an
attachment, and in that case, the MailHeaders.ATTACHMENT_FILENAME
header is required. Otherwise, a String type is expected, and its content
will be used as the text within a SimpleMailMessage.
MailHeadersEXPRESSION_PARSER, logger| Constructor and Description |
|---|
MailSendingMessageHandler(org.springframework.mail.MailSender mailSender)
Create a MailSendingMessageHandler.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getComponentType() |
protected void |
handleMessageInternal(org.springframework.messaging.Message<?> message) |
handleMessage, onComplete, onError, onNext, onSubscribebuildSendTimer, configureMetrics, destroy, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getHandlerMetrics, getIntegrationPatternType, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMetricsCaptor, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onInit, registerMetricsCaptor, reset, sendTimer, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabled, shouldTrackafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic MailSendingMessageHandler(org.springframework.mail.MailSender mailSender)
mailSender - the MailSender instance to which this
adapter will delegate.public java.lang.String getComponentType()
getComponentType in interface org.springframework.integration.support.context.NamedComponentgetComponentType in class org.springframework.integration.handler.MessageHandlerSupportprotected final void handleMessageInternal(org.springframework.messaging.Message<?> message)
handleMessageInternal in class org.springframework.integration.handler.AbstractMessageHandler