TonyBunney
New member
- Joined
- Dec 10, 2009
- Messages
- 2
- Programming Experience
- 1-3
I send numerous emails as part of my business and receive "Undelivered Mail" emails where an email files due to (for example) the email no longer exists.
These "Undelivered Mail" emails normally contain the email address which has failed in the body of the email and so I am able to identify the email and process the return accordingly BUT some email systems return the details of the original email address as attachments, which can be text (.txt) files or an mail object (which is a copy of the original email that I sent).
I have no problem accessing the data in the text files but I am having problems access the details of the attachment which contain the original email)
I have tried
Dim mailattachment As Outlook.Attachment = Me.MailItem.Attachments.Item(i) but the Attachment object does not seem to have a property which reveals the email address I am looking for.
I have also tried dim MailAtt As Microsoft.Office.Interop.Outlook.MailItem = Me.MailItem.Attachments.Item(i) but this results is a COM error as follows (No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).)
Any Help would be appreciated.
These "Undelivered Mail" emails normally contain the email address which has failed in the body of the email and so I am able to identify the email and process the return accordingly BUT some email systems return the details of the original email address as attachments, which can be text (.txt) files or an mail object (which is a copy of the original email that I sent).
I have no problem accessing the data in the text files but I am having problems access the details of the attachment which contain the original email)
I have tried
Dim mailattachment As Outlook.Attachment = Me.MailItem.Attachments.Item(i) but the Attachment object does not seem to have a property which reveals the email address I am looking for.
I have also tried dim MailAtt As Microsoft.Office.Interop.Outlook.MailItem = Me.MailItem.Attachments.Item(i) but this results is a COM error as follows (No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).)
Any Help would be appreciated.