Class SenderMessageProcessor
java.lang.Object
ch.tocco.nice2.messaging.mail.impl.processor.SenderMessageProcessor
- All Implemented Interfaces:
MessageProcessor
@Component
@Order(1000)
public class SenderMessageProcessor
extends Object
implements MessageProcessor
SenderMessageProcessor
checks if the sender email address is one of the customer's domain. If not,
it is most likely sent from a public form and may result in a failing SPF check and fail to be delivered.
To prevent spf check failure and ensure DKIM signatures are not invalid, the mail From and Reply-to header are set in the following way:
From: "sender name via default email address <default email address>
"
Reply-To: sender-email
See Task #35220 (and #31416, #31995, TOCDEV-1448) and for more detailed information.-
Field Summary
Fields inherited from interface ch.tocco.nice2.messaging.mail.spi.processing.MessageProcessor
HIGH_PRIORITY, LOW_PRIORITY
-
Constructor Summary
ConstructorDescriptionSenderMessageProcessor
(BusinessUnitEmailService businessUnitEmailService, TextResources textResources, AllowedFromPatternResolver patternResolver) -
Method Summary
Modifier and TypeMethodDescriptionvoid
process
(MailMessage message, Map<String, Object> attributes) void
setPersonalTextOnAddress
(jakarta.mail.internet.InternetAddress fromAddressNew, String personalText)
-
Constructor Details
-
SenderMessageProcessor
public SenderMessageProcessor(BusinessUnitEmailService businessUnitEmailService, TextResources textResources, AllowedFromPatternResolver patternResolver)
-
-
Method Details
-
process
- Specified by:
process
in interfaceMessageProcessor
- Throws:
MailException
-
setPersonalTextOnAddress
public void setPersonalTextOnAddress(jakarta.mail.internet.InternetAddress fromAddressNew, String personalText) throws MailException - Throws:
MailException
-