I have run into an issue this weekend with case sensitivity of headers in MailSendingMessageHandler. Are mail headers expected to be case sensitive in SI? A brief bit of research has led to me to discover that email headers in general should be insensitive (1).
Is this an oversight in SI or have I missed something obvious?
The RFCs are talking about the headers that go over the wire (e.g. SMTP). The MailSendingMessageHandler receives a Spring Integration (SI) message and maps the SI headers to SMTP headers.
SI headers are case-sensitive.
For this reason (among others), we recommend using framework constants for the headers, instead of coding your own values.
For example
in java or
in a SpEL expression specifying the header name.