Subject: “Invalid TNES format”
Date: 2014-04-25 09:48:58
From: David Angers
Source: invalid-tnes-format
----------------------------------------------------------------------

We are using the latest version of the component from your site and when we process the attached .eml file with the bounce inspector.  We are unable to process the attachments as we get “Invalid TNES format” when we try to manipulate the attachments in the attachment collection. Code snippet as follows:

 

              ComponentPro.Net.Mail.BounceResult bounceResult = bounceInspector.Process("C:/20140415_152815_8770481.eml");

 

                if (bounceResult.MailMessage != null){

 

                    if (deliveryDTO.AttachmentCount > 0) {

                        bounceResult.MailMessage.Attachments.ToList().ForEach(a => {

                            if (a.ContentMessage != null) {

                                originalMessageSMTPMessageId = a.ContentMessage.MessageId.Id;

 

                                var attMsgIds = a.ContentMessage.Headers.Where(h => h.Name.ToLower() == "msg-id" || h.Name.ToLower() == "x-msg-id");

                                if (attMsgIds.Count() > 0) {

                                    originalMessageSMTPMessageId = attMsgIds.FirstOrDefault().Value.ToString();

                                }

 

                               

                                // gets the first To address

                                if (a.ContentMessage.To.Count > 0)

                                    originalMessageOriginator = a.ContentMessage.To[0].Address;

 

                                originalMessageDateSent = a.ContentMessage.Date.OriginalTime;

                            }

                        });

                    }

              }

 

The code above fails when running the foreach loop and returns “Invalid TNES format”.  The .eml was generated from a microsoft exchange server and an outlook 2010 client.  The attachment is a read receipt which opens fine in any email client but will not be processed by the bounceinspector.

 

Any help would be appreciated.

 

Many thanks

---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index