Hi, I am writting a sink for Exchange 2003 that should check the specific user account where bounce back emails are return that are not delivered. The email contains the original email and any attachment as an attachment to the bounced email. I want to read the orignal email and its headers to get some information. How can I do this? I am using C# to read emails from that user account. Any Help. Thanks, Irfan
The original message should be an attachment of the NDR message with a content type of message/rfc822 so to access the message you can use CDOEX to loop though the attachment collection then use the ibodypart interface and imessage to open up that attachment as a message eg eg set msgobj = createobject("CDO.Message") msgobj.datasource.open Href,oCon,3 set objattachments = msgobj.attachments for each objattachment in objattachments if objAttachment.ContentMediaType = "message/rfc822" then set msgobj1 = createobject("cdo.message") msgobj1.datasource.OpenObject objattachment, "ibodypart" exit for end if next msgobj1 would then contain the original message Cheer Glen "Irfan" wrote in message news:DE54D010-2F5E-47FB-B17A-09E2765806F2@microsoft.com... > Hi, > > I am writting a sink for Exchange 2003 that should check the specific user > account where bounce back emails are return that are not delivered. The > email > contains the original email and any attachment as an attachment to the > bounced email. > > I want to read the orignal email and its headers to get some information. > How can I do this? I am using C# to read emails from that user account. > > Any Help. > > Thanks, > Irfan