The second header is read correctly, the first however (multi-line) is skipped.
IETF RFC 7230:
The BWS rule is used where the grammar allows optional whitespace
only for historical reasons. A sender MUST NOT generate BWS in
messages. A recipient MUST parse for such bad whitespace and remove
it before interpreting the protocol element.
This means that the Aspose MailMessage.load method should read that first header and transform it to a single line header, accessible through message.getHeaders().getValues("References").
FYI: The first header is how Microsoft Outlook currently formats references headers.
You reported that Aspose Email for Java (version 25.9-jdk16) does not correctly parse multi-line header values, specifically the ‘References’ header . According to IETF RFC 7230, recipients should parse and remove bad whitespace in headers, implying that Aspose should normalize multi-line headers into a single-line format . Microsoft Outlook formats References headers in a multi-line fashion, which Aspose should properly handle .
This appears to be a bug in the header parsing logic where the first multi-line header is skipped while the second single-line header is parsed correctly. Aspose should transform the multi-line header into a single-line format accessible through message.getHeaders().getValues("References").
To confirm and potentially work around this issue, you could try:
Load the email message using MailMessage.load()
Check the raw headers using message.getHeaders().get("References") to see if the multi-line header is present
Try accessing the values using message.getHeaders().getValues("References") to verify if they’re being parsed correctly
If this confirms the bug, please consider logging it internally for the Aspose team to investigate further. A minimal reproducible example would help in confirming the issue.
A support engineer will follow up in this thread if needed.
You reported that Aspose Email for Java (version 25.9-jdk16) does not correctly parse multi-line header values, specifically the ‘References’ header . According to IETF RFC 7230, recipients should parse and remove bad whitespace in headers, implying that Aspose should normalize multi-line headers into a single-line format . You confirmed that the first multi-line header is skipped while the second single-line header is parsed correctly, suggesting an issue in the header parsing logic .
This appears to be a bug in the header parsing logic where the first multi-line header is skipped while the second single-line header is parsed correctly. Aspose should transform the multi-line header into a single-line format accessible through message.getHeaders().getValues("References").
To confirm and potentially work around this issue, you could try:
Load the email message using MailMessage.load()
Check the raw headers using message.getHeaders().get("References") to see if the multi-line header is present
Try accessing the values using message.getHeaders().getValues("References") to verify if they’re being parsed correctly
If this confirms the bug, please consider logging it internally for the Aspose team to investigate further. A minimal reproducible example would help in confirming the issue.
A support engineer will follow up in this thread if needed.
@monis
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): EMAILJAVA-35432
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.