I responded in the email but was not sure if you received it.
I have tried this many years ago, so feel free to see if it still works.
I found this easy-to-implement BPML code for attaching the PrimaryDocument to an SMTP Send.
Normally the Primary Document becomes the body of the email. With this it should be the attachment.
‹operation name="Get Document Information Service"›
‹participant name="GetDocumentInfoService"/›
‹output message="GetDocumentInfoServiceTypeInputMessage"›
‹assign to="DocumentContentSubType"›Text; name="ResponseReport.txt"‹/assign›
‹assign to="DocumentContentType"›Application‹/assign›
‹assign to="." from="*"›‹/assign›
‹/output›
‹input message="inmsg"›
‹assign to="." from="*"›‹/assign›
‹/input›
‹/operation›
‹operation name="SMTP Send Adapter"›
‹participant name="SMTP_SEND_ADAPTER"/›
‹output message="SMTP_SEND_ADAPTERInputMessage"›
‹assign to="b2b-raw-message"›false‹/assign›
‹assign to="xport-smtp-mailhost"›smtp.corp.dom‹/assign›
‹assign to="xport-smtp-mailport"›25‹/assign›
‹assign to="xport-smtp-mailfrom" from="sci-get-property('pge_specific.properties',concat(string(/ProcessData/EmailPrefix),'_Mailfrom'))"›‹/assign›
‹assign to="xport-smtp-mailto" from="sci-get-property('pge_specific.properties',concat(string(/ProcessData/EmailPrefix),'_Mailto'))"›‹/assign›
‹assign to="xport-smtp-mailsubject" from="string(SendMail/subject)"›‹/assign›
‹assign to="." from="*"›‹/assign›
‹/output›
‹input message="inmsg"›
‹assign to="." from="*"›‹/assign›
‹/input›
‹/operation›
------------------------------
Regards,
Satya Venkataraman
Senior Solution Architect
B2B Integration Services & Partner Engagement Solutions
IBM AI Applications
(804) 837-6569
satya@ibm.com------------------------------