Hi Erki,
You could get attachment data from process variable. Like this:
<attachment name='strip.gif' expression='${strip}' mime-type='image/gif'/>
Please refer the testcase in svn.
http://anonsvn.jboss.org/repos/jbpm/jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/AttachmentTest.java