Our objective is to send an email with a custom attachment (or pdf generated by the studio).
In order to do this, I created a custom BO with an element DUMMY and an action “SENDMAIL”.
In the implementing script for the action, I followed the Melvin’s instructions by creating an EmailActivity instance with a subject and then I added parties and the email body:
Finally our code in order to add some attachments. The first one is an empty attachment (just for test, but you can add a custom binary (base64) content. The second one is a pdf generated using a form binded to our custom BO containing the dummy element:
Unfortunately it seems that actually, there is no way to add a name for the sent attachments (if someone succeeds to do this please contact me).