Reputation: 140
I am using the Crafter class EmailFactoryImpl to send emails. I need to be able to send a custom header to the email server. This header (X-SES-CONFIGURATION-SET) is needed in the email server we use: AWS.
Taking a look at EmailFactoryImpl API, the MimeMessage is being created inside the class and there is no way to specify custom headers via parameters.
Is there any work around for this?
Upvotes: 1
Views: 49
Reputation: 598
Right now at this time you can't. EmailFactory
is more of an utility class to easily and quickly create and send emails, but it doesn't allow for heavy customization like adding a header. In this case you're better just using the MimeMessage
class directly or Spring's MimeMessageHelper
.
Upvotes: 1