IncomingEmail support for more than 3 attachments?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

IncomingEmail support for more than 3 attachments?

Post by joben »

Scenario:
We want to send emails with attached pdf files to our business space, and we want every pdf file to be inserted in a BO along with some other attributes.
We use the IncomingEmail notification object with some rules, This works like a charm under certain circumstances.

The problem is that if we send emails with our email signature included, the images in the signatures are seen as "attachments" and thus get attached to these attributes: "Attachment1", "Attachment2", "Attachment3".
This is fine if you have for instance 1 image and 1 pdf file.

If you have 3 images and 1 pdf file you get something like this:
Attachment1 contains image1.jpg
Attachment2 contains image2.jpg
Attachment3 contains a zip file called "OtherAttachments.zip" which contains image3.jpg and documentname.pdf

This is expected behaviour and is also well-documented in the User Guide:
There are also three attributes of the Document type
representing the e-mail attachments. The first two attachments (if present) are contained
in the first two attachment attributes. If e-mail has more than two attachments all other
attachments are zipped up and stored in the third attachment attribute.
The obvious workaround is to remove your email signature when sending attached pdf files and send max 2 pdf files at a time.
This means we put unnecessary responsibility on the end user. It will also introduce some uncertainty among the users like "will this actually work?" I am not willing to do this.

The annoying solution I have come up with is to store the zip file in a directory on the server, have a script unzip it and do some stuff with the pdf file so they get attached to the correct BO row. This seems like a lot of hassle and we introduce more steps that could fail. I am reluctant to do this unless we have to. But I believe this is absolutely a way forward.

The best solution would be if we simply had more than 3 attachment attributes :)

The second best solution would be if we could read the zip file contents using the built-in AwareIM functions and rule language.

Would be interesting to hear if anyone knows a better way than "The annoying solution" described above.
Regards, Joakim

Image
Post Reply