Background
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.
Problem
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
Solution is to use attachment connector to send CSV file and attach attachment connector to the mail connector .
Step 1:
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.
Step 2:
Go to the Mail Connector settings relevant runtime and click edit mail
Step 3
In Edit Mail window click the attachment Icon.
Then below window will appeared.
Step 4:
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)
Step 5:
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.
http://streamshare.streamserve.com/Articles/Article/?articleId=325
$que = "ATTA";
callproc("CSVO");
Now all good , export the project.
Output
You can see two attachment were attached in to one email.
Useful links
· http://streamshare.streamserve.com/Forum/Topic/?topicID=9731
· http://streamshare.streamserve.com/Forum/Topic/?topicID=7482
· http://streamshare.streamserve.com/Articles/Article/?articleId=325