parse eml file attachment
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
parse eml file attachment

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Raphaël Désalbres
Guest





Posted: Wed Nov 23, 2005 5:58 pm    Post subject: parse eml file attachment Reply with quote

Hello, everybody,

I am facing the following problem: I need to open an .eml file, parse it to
get the attachment (which is a csv file) , but I don't know how.

Some people said the problem could be solved with Regex..

If someone could send me a code exerpt in C#, I would be very grateful...

Thanks very much,

Raphaël Désalbres

Back to top
Raphaël Désalbres
Guest





Posted: Wed Nov 23, 2005 5:58 pm    Post subject: Re: parse eml file attachment Reply with quote

Hello,

I just found how...

CDO.DropDirectory iDropDir=new CDO.DropDirectoryClass();

CDO.IMessages iMsgs;

iMsgs = iDropDir.GetMessages("c:\\inetpub\\mailroot\\drop");

foreach(CDO.Message msg in iMsgs)

{

if(msg.Attachments.Count==1)

{

msg.Attachments[1].SaveToFile(@"C:\att.xml");

}

}

Thanks,

Raphaël....


"Raphaël Désalbres" <raphael@desalbres.com> escreveu na mensagem
news:OO1CqKD8FHA.4012@TK2MSFTNGP14.phx.gbl...
Quote:
Hello, everybody,

I am facing the following problem: I need to open an .eml file, parse it
to get the attachment (which is a csv file) , but I don't know how.

Some people said the problem could be solved with Regex..

If someone could send me a code exerpt in C#, I would be very grateful...

Thanks very much,

Raphaël Désalbres
Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB