Question

IMAPS Publication not processing attachments from iPhone

  • 25 January 2019
  • 0 replies
  • 2 views

Hi all

 

I hope you can help. I'm fairly new to FME Server, but am having an issue with IMAPS picking up email.

  • We've recently migrated our email from on-premise Exchange to a cloud-hosted solution (Exchange365).
  • We have some contractors out in the field that email geotagged photos from their iPhones to a specific email address.
  • For the past few years, we've been relying on an SMTP "notification publication" on FME server to pick up these emails and process them accordingly.
  • From what I can see, the publication picks up the email, saves any attached photos to a specific folder and adds the location of that folder to a text file. The text file also contains a bunch of meta data contained in the email (sender, date, that sort of thing).
  • An FME workbench is then called that uploads that photograph to a map and tags it with the metadata.

 

Here's an example of the text file that is generated:

 

{

"fns_type": "email_publisher",

"email_publisher_to": "fme@domain.co.nz",

"email_publisher_content_type{0}": "text/plain; charset=\\"us-ascii\\"",

"email_publisher_received": "Fri Jan 25 08:55:02 NZDT 2019",

"email_publisher_sent": "Fri Jan 25 08:55:02 NZDT 2019",

"email_publisher_content{0}": "\\r\\n**********************************************************************\\r\\nCAUTION: This email and any attachments may contain information that is confidential. If you are not the intended recipient, you must not read, copy, distribute, disclose or use this email or any attachments. If you have received this email in error, please notify us and erase this email and any attachments. You must scan this email and any attachments for viruses.\\r\\nDISCLAIMER: Kennedy Limited accepts no liability for any loss, damage or other consequences, whether caused by its negligence or not, resulting directly or indirectly from the use of this email or attachments or for any changes made to this email and any attachments after sending by Kennedy Limited. The opinions expressed in this email and any attachments are not necessarily those of Kennedy Limited. **********************************************************************\\r\\n",

"email_publisher_attachment{0}": "C:\\\\Windows\\\\TEMP\\\\gis262842233905399_IMG_3768.JPG",

"email_publisher_from": "sender@domain.co.nz",

"email_publisher_subject": "33kv burning"

}

 

As you can see, there is a field called "email_publisher_attachement" that holds the path to the photograph.

Now, since changing our email retrieval method to IMAPS, it appears that photographs are not appearing as attached to the email when being sent from an iPhone. Instead they are being embedded. The IMAPS publication reads it as content rather than an attachment and doesn't pick up the attachment. The generated text file appears as follows:

 

{

"imap_publisher_content{1}": "com.sun.mail.util.BASE64DecoderStream@a99e6a",

"fns_type": "imap_publisher",

"imap_publisher_sent": "Wed Jan 23 16:37:18 NZDT 2019",

"imap_publisher_from": "Matt Herrett <sender@domain.co.nz>",

"imap_publisher_content_type{1}": "image/jpeg; name=image1.jpeg",

"imap_publisher_subject": "I give up.",

"imap_publisher_content_type{0}": "text/html; charset=us-ascii",

"imap_publisher_received": "Wed Jan 23 16:37:22 NZDT 2019",

"imap_publisher_content{0}": "<html>\\r\\n<head>\\r\\n<meta http-equiv=\\"Content-Type\\" content=\\"text/html; charset=us-ascii\\">\\r\\n<\\/head>\\r\\n<body dir=\\"auto\\">\\r\\n<img src=\\"cid:640C293C-0059-4FB0-9ADB-DE4751504C99\\" alt=\\"image1.jpeg\\" id=\\"640C293C-0059-4FB0-9ADB-DE4751504C99\\"><br>\\r\\n<br>\\r\\n<div id=\\"AppleMailSignature\\" dir=\\"ltr\\">Matt\\r\\n<div>027 704 6480<\\/div>\\r\\n<\\/div>\\r\\n<\\/body>\\r\\n<\\/html>\\r\\n",

"imap_publisher_to": "fme@domain.co.nz"

}

 

I have amended the work bench to use the new field names, and it works as long as I send a photo from my Windows laptop. If I send from an iPhone (which will usually be the client used), the "imap_publisher_attachment" field is not populated and the image is dropped

Is there a method for reading inline photos using the IMAPS publication method in FME Server, or am I barking up the wrong tree?

Any help you can provide is gratefully received.

Thanks

Matt


0 replies

Be the first to reply!

Reply