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>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB