Nelson
Joined: 14 Jun 2005
Posts: 16
|
Posted:
Mon Nov 14, 2005 7:21 pm Post subject:
Attached image is email background? |
|
|
I have an application that is successfully obtaining emails and saving any file attachments. I do this by checking the x37050003 value in my response XML. If it is = 1, then I know it's an attached file (like 6 = embedded image attachment). The issue I'm finding is that we are getting lots of emails that contain background images (like a nature background, etc...) I want to ignore these attachments. These are coming in where 37050003 = 1 though. I thought I had found a solution by looking at another property called (PR_ATTACH_METHOD) and checking if was not present or = 0, then I would consider it a valid attachment. Anything else, I would ignore it. Unfortuantely, this was not true as some images are coming in with PR_ATTACH_METHOD (37140003) = 4 are valid.
So, how do I determine if the file attached is a background image to an email? Below is the XML I'm getting back for one of these. The first 2 attachments are to be ignored and only the last PDF attachament is valid. Again, there are times where I need to accept some image attachments (jpg, gif, or even bmp).
Any help is greatly appreciated!
Thank you,
Frank
<?xml version="1.0"?>
<a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:e="urn:schemas:httpmail:" xmlns:c="xml:" xmlns:d="http://schemas.microsoft.com/mapi/proptag/" xmlns:f="urn:schemas:contacts:" xmlns:a="DAV:">
<a:response>
<a:href>http://KCEXUSER01/exchange/commissions@transamerica.com/Inbox/FW:%20Joe%20Curtin%20-%20128-60-2504.EML/anabnr2.gif</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<d:x3703001f>.gif</d:x3703001f>
<d:x3704001f/>
<d:x37050003 b:dt="int">1</d:x37050003>
<d:x370b0003 b:dt="int">-1</d:x370b0003>
<d:x370e001f>image/gif</d:x370e001f>
<d:x3712001f>115460216@11112005-1758</d:x3712001f>
<d:x37140003 b:dt="int">4</d:x37140003>
<d:x0e200003 b:dt="int">15581</d:x0e200003>
<d:x0e210003 b:dt="int">0</d:x0e210003>
<e:attachmentfilename>anabnr2.gif</e:attachmentfilename>
<f:cn>anabnr2.gif</f:cn>
</a:prop>
</a:propstat>
</a:response>
<a:response>
<a:href>http://KCEXUSER01/exchange/commissions@transamerica.com/Inbox/FW:%20Joe%20Curtin%20-%20128-60-2504.EML/Nature%20Bkgrd.jpg</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<d:x3703001f>.jpg</d:x3703001f>
<d:x3704001f/>
<d:x37050003 b:dt="int">1</d:x37050003>
<d:x370b0003 b:dt="int">-1</d:x370b0003>
<d:x370e001f>image/jpeg</d:x370e001f>
<d:x3712001f>115460216@11112005-175F</d:x3712001f>
<d:x37140003 b:dt="int">4</d:x37140003>
<d:x0e200003 b:dt="int">3870</d:x0e200003>
<d:x0e210003 b:dt="int">1</d:x0e210003>
<e:attachmentfilename>Nature Bkgrd.jpg</e:attachmentfilename>
<f:cn>Nature Bkgrd.jpg</f:cn>
</a:prop>
</a:propstat>
</a:response>
<a:response>
<a:href>http://KCEXUSER01/exchange/commissions@transamerica.com/Inbox/FW:%20Joe%20Curtin%20-%20128-60-2504.EML/Scan001.PDF</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<d:x3703001f>.PDF</d:x3703001f>
<d:x3704001f/>
<d:x37050003 b:dt="int">1</d:x37050003>
<d:x370b0003 b:dt="int">-1</d:x370b0003>
<d:x37140003 b:dt="int">0</d:x37140003>
<d:x0e200003 b:dt="int">228586</d:x0e200003>
<d:x0e210003 b:dt="int">2</d:x0e210003>
<e:attachmentfilename>Scan001.PDF</e:attachmentfilename>
<f:cn>Scan001.PDF</f:cn>
</a:prop>
</a:propstat>
</a:response>
</a:multistatus>
|
|