Support Attachments in MailActivityBehavior

Description

While it is possible to support email attachments by writing a specialized service task, it would be much more convenient when activitis MailActivityBehavior would support attachments out of the box.

I propose to add one new property to the mail task configuration: attachments

This can either be a java.util.File, a String, or a javax.activation.DataSource, or an array of one of these objects.
A file is just attached as is, with the name of the file as name of the attachment, and a String is interpreted as path to a file.
In case of a DataSource, the name attribute of the data source is used as name of the attachement.

I have prepared a patch for this (including tests and user manual), but I am of course open for different suggestions for this interface.
(The real work is done in the 3rd patch - the first increases the commons-email version and the second is a fully optional minor cleanup.)

Assignee

Tijs Rademakers

Reporter

Heinz-Dieter Conradi

Labels

None

Components

Fix versions

Priority

Major
Configure