Help! I got two attachments when I use you code. However, when I use outlook to open it,I got three attachments.

Mar 15, 2010 at 5:56 AM
Edited Mar 15, 2010 at 7:44 AM

Help! I got two attachments when I use you code. However, when I use outlook to open it,I got three attachments.

What 's wrong.


This's the email backup file download link:

http://21.dc.ftn.qq.com/ftn_handler/e027fcebeb6d534d098ac25555c105c6d09b13812d535474dc75ecacfe87da09931edda9de7db3b1b889bdbf185bd55ba942a16e4274204bb96fb09867f62b0d/md50000002803.msg?k=71383564f9a8cdc65641e3774e3502160717065c0001050c010c185450050614020951554b57065b0e1556525402005f020e065d0702372836555151560507090608075c56061954455f35&&txf_fid=3a073513d4623845fdf029bdf6439c0f09850b4e

Coordinator
Mar 17, 2010 at 12:17 PM

Perhaps you get attachment file with the code.
List<Pop3Content> l = Pop3Message.GetAttachedContents(mg);
And you can get two Pop3Content.Is it OK?

On above hypothetical situations,I test your data and I figure out that the data has four mime content.
Mime spec says that we can include mime content inside mine content.

GetAttachedContents method enumerate all Contents hirarchy recursive and get all Pop3Contents that IsAttachment property is true.
IsAttachment propety is defined at InternetTextMessage class and inside this property simply check ContentDisposition property include string "attachment".

Your data is structured
Pop3Message
  --Content1(alternative file) IsAttachment=false
     --Content4(text data) IsAttachment=false
     --Content5(html data) IsAttachment=false
  --Content2(jpeg file) IsAttachment=true
  --Content3(bmp file) IsAttachment=true

Outlook show Content1 or Content5 as attachment propably.

regard.

--------Appendix--------
You can get Content2 to write below code.

Pop3Message mg = new Pop3Message(".....");
var c2 = mg.Contents[1];

You can get Content5 with
Pop3Message mg = new Pop3Message(".....");
String htmltext = mg.Contents[0].Contents[1].BodyText;






Mar 23, 2010 at 9:03 AM
Thank you very much!!

2010/3/17 higty <notifications@codeplex.com>

From: higty

Perhaps you get attachment file with the code.
List<Pop3Content> l = Pop3Message.GetAttachedContents(mg);
And you can get two Pop3Content.Is it OK?

On above hypothetical situations,I test your data and I figure out that the data has four mime content.
Mime spec says that we can include mime content inside mine content.

GetAttachedContents method enumerate all Contents hirarchy recursive and get all Pop3Contents that IsAttachment property is true.
IsAttachment propety is defined at InternetTextMessage class and inside this property simply check ContentDisposition property include string "attachment".

Your data is structured
Pop3Message
  --Content1(alternative file) IsAttachment=false
     --Content4(text data) IsAttachment=false
     --Content5(html data) IsAttachment=false
  --Content2(jpeg file) IsAttachment=true
  --Content3(bmp file) IsAttachment=true

Outlook show Content1 or Content5 as attachment propably.

regard.

--------Appendix--------
You can get Content2 to write below code.

Pop3Message mg = new Pop3Message(".....");
var c2 = mg.Contents[1];

You can get Content5 with
Pop3Message mg = new Pop3Message(".....");
String htmltext = mg.Contents[0].Contents[1].BodyText;






Read the full discussion online.

To add a post to this discussion, reply to this email (csharpmail@discussions.codeplex.com)

To start a new discussion for this project, email csharpmail@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com