spring - Polling Multiple email accounts from one app -


i supposed poll 3 email inboxes on our mail server using spring integration have 3 inbound email adapters doing , each poller handling different business logic. assuming inboxes i1,i2 , i3 problem arises when , sends 1 email 3 email ids in address .(i1@domain.org,i2@domain.org,i3.domain.org) . 3 pollers pick emails each inbox expected.

is there way determine right 'to' address each email poller , value in mail_to header . right has (i1@domain.org,i2@domain.org,i3.domain.org) in .

according comment other answer, "right" mean identify adapter email originated at.

it's not clear why need this, given each processed "different business logic" anyway. can see if adapters feed same logic might useful.

there's no way have adapter add header itself.

you add <header-enricher/> right after each adapter add header identify adapter received message.

edit: (for comments below).

you can't use <int-mail:header-enricher/> custom headers, can use regular header-enricher:

<int:header-enricher ...>    <int:header name="#{t(org.springframework.integration.mail.mailheaders).to}"                value="i1@domain.org" />    <int:header name="x-foo" value="bar" />    <int:header name="x-baz" expression="payload.getheader("x-baz") /> <!-- payload mimemessage --> </int:header-enricher> 

the int-mail version convenience built-in headers.

there's no existing "to" header overwrite - it's not populated inbound adapter.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -