Note that there are some explanatory texts on larger screens.

plurals
  1. POspring integration inbound email with custom header
    primarykey
    data
    text
    <p>I have a spring app that sends emails through and reads emails from a GMail inbox and handles any undelivered mail messages that have been sent through the account but then returned as the recipient address is not recognised. </p> <p>I have this all configured and working but I am also setting a custom header on the outbound message that I would like to retrieve when the returned mail is read. Debugging the app shows that the message is being read correctly but it is missing the custom header value.</p> <p>Here is my config:</p> <pre><code>&lt;mail:inbound-channel-adapter id="imapAdapter" store-uri="#{mailIntegrationProperties['mail.imap.url']}" java-mail-properties="mailIntegrationProperties" channel="receiveEmailChannel" should-delete-messages="false" should-mark-messages-as-read="true" auto-startup="true" max-fetch-size="#{mailIntegrationProperties['mail.max.fetch.size']}"&gt; &lt;int:poller time-unit="SECONDS" fixed-rate="#{mailIntegrationProperties['mail.poller.seconds']}" /&gt; &lt;/mail:inbound-channel-adapter&gt; &lt;int:channel id="receiveEmailChannel" /&gt; &lt;bean id="mailMessageReceiver" class="com.myapp.integration.mail.EmailMessageReceiver" /&gt; &lt;int:service-activator input-channel="receiveEmailChannel" ref="mailMessageReceiver" output-channel="emailEventMessageQueue" method="receive" /&gt; </code></pre> <p>I have left the output-channel of the service-activator off for brevity but the system is working as expected, but just the custom header is missing when I am processing the message.</p> <p>Any ideas on how to configure Spring to read that custom header?</p> <p>Cheers!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload