I have a MOM report (PPS601) in which I generate PO data as a CSV apart from the standard PDF layout. So in order to do that I use StreamOut process type in Stream Server.
Since my client wants output as a MAIL I used default mail connector to send the PDF layout and created a new connector copying the default mail connector to send CSV with TXT driver since PDF driver not support the CSV files.
But the problem is that CSV and PDF are sent in a two separate mails as single attachments. But my requirement is to have two files in one mail thread as two attachments.
Solution is to use attachment connector to send CSV file and attach attachment connector to the mail connector .
Create Attachment connector:
For attachment connector no need to specify the driver settings. In order to see the setting panel in attachment connector need to the switch to the generic platform view. In physical platform level attachment connector settings can’t be seen.
Go to the Mail Connector settings relevant runtime and click edit mail
In Edit Mail window click the attachment Icon.
Then below window will appeared.
In that popup change the attachment type to “Output from attachment connector” and give the attachment name for attachment connector. (Attachment connector which was created in platform previously).
Give attachment name(name for the CSV attachment ) to the “Attachment name” text box (even possible to use a variable)
Now make CSV process delivery media as the attachment connector that was created previously. To change the delivery media dynamically I used below code snipped in before process event. There is a nice article with detail explanation about changing delivery media in the StreamShare forum by Andreas Hjelle. Please read it.
$que = "ATTA";
Now all good , export the project.
You can see two attachment were attached in to one email.