commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (EMAIL-133) Problem reading datasource name of inner email-message
Date Thu, 10 Oct 2013 20:19:42 GMT

     [ https://issues.apache.org/jira/browse/EMAIL-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Neidhart resolved EMAIL-133.
-----------------------------------

    Resolution: Won't Fix

Close this issue as Won't Fix as the proposed patch is too application-specific imho.

> Problem reading datasource name of inner email-message
> ------------------------------------------------------
>
>                 Key: EMAIL-133
>                 URL: https://issues.apache.org/jira/browse/EMAIL-133
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Outlook 2007, James 3.0 beta4
>            Reporter: Olaf K.
>         Attachments: Parent EMail.msg
>
>
> Situation:
> - Create EMail in Outlook and attach an other EMail (via Drag&Drop)
>   e.g parent email subject: "Parent EMail", inner email subject: "Inner Email" 
> - after parsing this email I try to acces the attachmentname, but the result is a null-value.
I acpected "Inner Email" as the attachmentname.
> {code}
> mimeMessageParser.parse();
> List<DataSource> attachAsDataSource = mimeMessageParser.getAttachmentList();
> for (DataSource dataSource : attachAsDataSource) {
>   String filename = dataSource.getName();
>   // filename == null
> {code}
> To resolve this behavior I patched the Methode "getDataSourceName" in "MimeMessageParser"
as follows.
> {code}
> ..
> if ("message/rfc822".equalsIgnoreCase(contentType)) {
>   result = ((Message) part.getContent()).getSubject();
>   // START: Optional
>   if (StringUtils.isNotBlank(result)) {
> 	// Add eml-prefix, because binary data is in eml-format and I can use OUTLOOK.EXE /eml
"filename"
> 	result += ".eml";
>   } else {
> 	result = "unknown.eml";
>   }
>   // END: Optional
> }
> ...
> {code}
> Now the inner email is recognized as an email-message and the subject is used for the
name.
> Is there an other way to receive the subject as the attachment-name (without patching)?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message