You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Ezequiel Foncubierta <ef...@zaizi.com> on 2011/06/27 19:38:29 UTC

HMEF vs HSMF

Hi,

I'm trying to parse a RTF mail message that contains the following header:

Content-Type: application/ms-tnef; name="winmail.dat"

Should I use HMEFMessage instead of MAPIMessage? By using MAPIMessage I can get all the message properties (subject, an so on) but can't get one of the attachments (an image in the signature) because the attachData attribute is null. I attached the .msg file I'm talking about.

On the other, if I have to use HMEFMessage to extract the attachments, How do I get the winmail.dat file from a .msg? Is it possible?

Thanks. Regards,



This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.

Zaizi Ltd is registered in England and Wales with the registration number 6440931. The Registered Office is 203 Westbourne Studios, 242 Acklam Road, London W10 5JJ, UK.


Re: HMEF vs HSMF

Posted by Ezequiel Foncubierta <ef...@zaizi.com>.
Done.

https://issues.apache.org/bugzilla/show_bug.cgi?id=51446

Thanks again Nick.

On 28 Jun 2011, at 11:36, Nick Burch wrote:

> On Tue, 28 Jun 2011, Ezequiel Foncubierta wrote:
>> Anyway, how can I send you the .msg file? Can I send you it to your email account?
> 
> What'd be great is if you could open a new bug in bugzilla, and upload the file there. We can then use it for a unit test, as we don't have anything yet that links HMEF and HSMF
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 



This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.

Zaizi Ltd is registered in England and Wales with the registration number 6440931. The Registered Office is 203 Westbourne Studios, 242 Acklam Road, London W10 5JJ, UK.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: HMEF vs HSMF

Posted by Nick Burch <ni...@alfresco.com>.
On Tue, 28 Jun 2011, Ezequiel Foncubierta wrote:
> Anyway, how can I send you the .msg file? Can I send you it to your 
> email account?

What'd be great is if you could open a new bug in bugzilla, and upload the 
file there. We can then use it for a unit test, as we don't have anything 
yet that links HMEF and HSMF

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: HMEF vs HSMF

Posted by Ezequiel Foncubierta <ef...@zaizi.com>.
Hi Nick,

You can create a similar message as following (Microsoft Outlook 2007):

- Go to Tools -> Options -> Mail Format -> Signatures
- Create a new signature (e.g. Demo)
- Add a picture to your new signature (e.g. My Documents/My Pictures/Sample Pictures/Blue hills.jpg)
- Send an email using that signature
- Use the received message to do the test
- Should be able to extract the image data

Anyway, how can I send you the .msg file? Can I send you it to your email account?

Thanks a lot Nick. Kind Regards,

On 27 Jun 2011, at 23:49, Nick Burch wrote:

> On Mon, 27 Jun 2011, Ezequiel Foncubierta wrote:
>> I'm trying to parse a RTF mail message that contains the following header:
>> 
>> Content-Type: application/ms-tnef; name="winmail.dat"
> 
> What kind of file is it? (Alas the mailing list eats most attachments)
> 
>> Should I use HMEFMessage instead of MAPIMessage?
> 
> HMEFMessage should be used when you have a winmail.dat file. MAPIMessage should be used when you have an outlook .msg file.
> 
>> By using MAPIMessage I can get all the message properties (subject, an so on) but can't get one of the attachments (an image in the signature) because the attachData attribute is null.
> 
> Normally when AttachData is null, that means you instead have a directory attachment, and in almost all cases you can get a nested MAPIMessage for the attachment.
> 
>> On the other, if I have to use HMEFMessage to extract the attachments, How do I get the winmail.dat file from a .msg? Is it possible?
> 
> I don't know how a winmail.dat file gets stored in an outlook .msg file, but if you have a sample file you can share that'd be great! That said, winmail.dat is normally used as a transport to wrap up all the outlook properties on the wire, and I thought it was normally decoded back by outlook on receipt?
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 



This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.

Zaizi Ltd is registered in England and Wales with the registration number 6440931. The Registered Office is 203 Westbourne Studios, 242 Acklam Road, London W10 5JJ, UK.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: HMEF vs HSMF

Posted by Nick Burch <ni...@alfresco.com>.
On Mon, 27 Jun 2011, Ezequiel Foncubierta wrote:
> I'm trying to parse a RTF mail message that contains the following 
> header:
>
> Content-Type: application/ms-tnef; name="winmail.dat"

What kind of file is it? (Alas the mailing list eats most attachments)

> Should I use HMEFMessage instead of MAPIMessage?

HMEFMessage should be used when you have a winmail.dat file. MAPIMessage 
should be used when you have an outlook .msg file.

> By using MAPIMessage I can get all the message properties (subject, an 
> so on) but can't get one of the attachments (an image in the signature) 
> because the attachData attribute is null.

Normally when AttachData is null, that means you instead have a directory 
attachment, and in almost all cases you can get a nested MAPIMessage for 
the attachment.

> On the other, if I have to use HMEFMessage to extract the attachments, 
> How do I get the winmail.dat file from a .msg? Is it possible?

I don't know how a winmail.dat file gets stored in an outlook .msg file, 
but if you have a sample file you can share that'd be great! That 
said, winmail.dat is normally used as a transport to wrap up all the 
outlook properties on the wire, and I thought it was normally decoded back 
by outlook on receipt?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org