Thanks for your reply
Customer was ok with the Zip approach, otherwise I would have used the
ExecuteProcess processor to run a custom script.
Mika>
On 09/15/2017 07:39 PM, Joe Witt wrote:
Mika,
Could it be ok for your case to use MergeContent to package data
together in some archive format like Zip/Tar? If yes then you can
just add a tar/zip to your email.
Otherwise, the changes necessary to PutEmail for supporting multiple
attachments would be quite involved.
Thanks
On Wed, Sep 13, 2017 at 12:26 PM, Mika Borner <[email protected]> wrote:
Hi
I have a use case where I need to attach two files to a mail message.
As the PutEmail processor only handles one flowfile as an attachment at a
time, I'm trying to compose the multipart message by myself.
I have Base64 encoded the attachment and added boundaries, and then added
the data into the message attribute, but now I'm unable to set the Content
Type to "multipart/mixed; boundary=<boundary>", which would be needed.
I'm getting an exception:
2017-09-13 18:12:08,850 ERROR [Timer-Driven Process Thread-10]
o.a.nifi.processors.standard.PutEmail
PutEmail[id=015e1000-5cef-1d09-a660-e1ef3a8825ab] Failed to send email for
StandardFlowFileRecord[uuid=2beb9198-06d6-4a68-8456-aaed0c6fc89a,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1505288584837-1, container=default,
section=1], offset=813176,
length=197],offset=0,name=33321931515708,size=197]: MIME part of type
"multipart/mixed; boundary=attachement" contains object of type
java.lang.String instead of MimeMultipart; routing to failure:
javax.mail.MessagingException: MIME part of type "multipart/mixed;
boundary=attachement" contains object of type java.lang.String instead of
MimeMultipart
javax.mail.MessagingException: MIME part of type "multipart/mixed;
boundary=attachement" contains object of type java.lang.String instead of
MimeMultipart.
Any ideas? Or any other suggestions how I can send multiple mail
attachements with NiFi?
Thanks!
Mika>