commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olaf Kaus <>
Subject [email] Problem reading filename from inline email
Date Fri, 20 Sep 2013 17:13:23 GMT
how can I extract the filename from an included email.
If I use mimeMessageParser.getAttachmentList() and then
dataSource.getName() but I received null for attched emails.

The incoming email was created with outlook (html-email) and via
drag-n-drop I include an other email as an attachment.

To resolve this behavior I patched the Methode "getDataSourceName" in
"MimeMessageParser" as follows.

if ("message/rfc822".equalsIgnoreCase(contentType)) {
result = ((Message) part.getContent()).getSubject();
if (StringUtils.isNotBlank(result)) {
result += ".eml";
} else {
result = "unknown.eml";

(I stripped some null-checks)

Do you have an other solution?

Thx in advance

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message