Login  
Search All Forums
Dart Home | PowerTCP Mail for .NET | Custom Development Reply | PowerTCP Mail for .NET Topics | Forums   
AuthorForum: PowerTCP Mail for .NET
Topic: Attachments founds as "Resource" and not "Attachments"
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted September 13, 2016 2:05 PM

Hi, hoping someone cab lead us the right way on this one. We have a app that polls a mailbox and processes emails with attachments.

From what we understand, the message parts are broken down as such.

1. Dart.Mail.Multipart - For mail Body if message format is html
2. Dart.Mail.TextPart - For mail body if message format is plain text
3. Dart.Mail.Resource - For objects embedded in email body.
4. Dart.Mail.Attachment - For rest of the attachments

Almost all of our customers we have using this app have zero issues. However, we have one customer that receives emails from a customer where their file attachments show up as Dart.Mail.Resource objects instead of Dart.Mail.Attachment objects. 

We find that we we forward the message after it comes into Exchange to examine the issue here in-house, the issue is corrected by Exchange seems after we receive the message (attachments are now Dart.Mail.Attachment objects as expected).

The customer wants us to fix this, but we are reluctant to process the Dart.Mail.Resource objects as regular attachments because we will likely get other in-line pictures as well.

What is the cause of this issue? Is it the email client they are using to send the original email that causes this?

Thanks!
Nick B (Admin)

From: Utica, NY USA
Posts: 578
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted September 13, 2016 2:51 PM

Hello,

A part is identified as a resource when the part's Content Disposition header value is 'inline', or when the part's headers provide no indication of what it is (in which case, identification as a Resource is a fallback).

So either the sending client is specifying inline for the Content Disposition, or it is providing no indication of what the part is (or is specifying it in an unrecognizable format).
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted September 13, 2016 2:58 PM

Thanks Nick. Can we safely say the senders are likely using an email client (or programmatic SMTP API) that is not adhering to common standards? Or this this going to far?
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted September 13, 2016 3:25 PM

After some further research, it sounds like it is possible these are coming from the Mac/OSX Mail app.

http://katiefloyd.com/blog/get-rid-of-inline-attachments-in-apple-mail

https://discussions.apple.com/thread/6654175?tstart=0

Do you know if we can still tell if they are TIFF or PDF MimeTypes? We will do some more testing. I would like to avoid grabbing every JPG, GIF, and PNG, so I am hoping we can differentiate the TIFF and PDF attachments from the others.
Nick B (Admin)

From: Utica, NY USA
Posts: 578
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted September 13, 2016 3:43 PM

"Not adhering to common standards" - depends on what the application is intending to do. Your subsequent post suggests that this may be intentional, so they may be adhering to common standards.

"Do you know if we can still tell if they are TIFF or PDF MimeTypes" - It depends upon what the sending application includes in the headers. I'd recommend examining the values of the properties of the Resource.ContentDisposition and Resource.ContentType properties to see if you can key off of anything contained within for the specific sending client. Resource.ContentId could provide some indication, but it's very unlikely.
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted September 13, 2016 3:58 PM

Thank you sir, have a good one!
Reply | PowerTCP Mail for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX