Good morning! I had the same situation and was able to execute the following codes to email payment information to different vendors - but it was done in B9 which should work well for XE.
What I did was create a driver program (e.g. R55DRIVER) call on the vendor detail program (e.g. R55PMT) by passing the vendor # thru a report interconnect. In the R55PMT, I added the following codes at the Report Level Event Rule Operations (you will access this within RDA by clicking on 'File', 'Event Rule Operation' and 'Edit Report Level Event Rules'):
=======================================================================
REPORT LEVEL EVENTS
=======================================================================
EVENT: End Report (future)
-----------------------------------------------------------------------
evt_JobstatusOW
evt_ProcessID
evt_JobName
evt_PathInput
evt_MachineUsage
evt_FileInput
evt_EmailSubject
evt_ServerProcessID
evt_EmailAddressTo
evt_EmailAddressFrom
evt_MachineKey
evt_Month_Chr
evt_Day_2Chr
0001 VA evt_JobstatusOW = "P"
0002 VA evt_EmailAddressFrom = "ACH Distribution System"
0003 VA evt_EmailSubject = "ACH Payment Register"
0004 Get Audit Information
VA evt_MachineKey <- szMachineKey
0005 Get UBE Output Path
SL ReportName -> szSRCNameObject_OBNM
SL LoginEnvironment -> szEnvironmentName_ENHV
VA evt_PathInput <- szPathFlatFile_NFLF
VA evt_MachineUsage <- szMachineUsage_USAGE
If VA evt_MachineUsage is equal to "20"
0006 // ***UBE was ran on a server
0007 Retrieve Process and Transaction IDs
VA evt_ServerProcessID <> mnProcessID
0008 F986110.Select
VA evt_JobstatusOW = TK Job Status
SL UserID = TK User ID
VA evt_MachineKey = TK Execution Host Name
0009 F986110.Fetch Next
VA evt_ProcessID <- TK Server Process ID
VA evt_JobName <- TK Foundation - Future Use 2
While VA evt_ProcessID is not equal to VA evt_ServerProcessID And SV File_IO_Status is not equal to CO ERROR
0010 F986110.Fetch Next
VA evt_ProcessID <- TK Server Process ID
VA evt_JobName <- TK Foundation - Future Use 2
0011 End While
0012 //
0013 VA evt_PathInput = concat([VA evt_PathInput],rtrim([VA evt_JobName],' ' ))
0014 VA evt_PathInput = concat([VA evt_PathInput],'.PDF')
0015 VA evt_FileInput = VA evt_JobName
0016 //
0017 Else
0018 // ***UBE was ran on a client
0019 //
0020 VA evt_Day_2Chr = lpad(date_day([SL DateToday ]),'0',2)
0021 VA evt_Month_Chr = lpad(date_month([SL DateToday ]),'0',2)
0022 //
0023 VA evt_FileInput = SL ReportName
0024 VA evt_FileInput = concat(rtrim([VA evt_FileInput],' ' ),'_' )
0025 VA evt_FileInput = concat(rtrim([VA evt_FileInput],' '),rtrim([SL VersionName ],' '))
0026 VA evt_FileInput = concat(rtrim([VA evt_FileInput],' '),'_D')
0027 VA evt_FileInput = concat(rtrim([VA evt_FileInput],' '),substr(date_year([SL DateToday ]),2,2 ))
0028 VA evt_FileInput = concat(rtrim([VA evt_FileInput],' '),[VA evt_Month_Chr])
0029 VA evt_FileInput = concat(rtrim([VA evt_FileInput],' '),[VA evt_Day_2Chr])
0030 VA evt_FileInput = concat(rtrim([VA evt_FileInput],' '),'_T*.PDF' )
0031 VA evt_FileInput = concat([VA evt_PathInput],[VA evt_FileInput])
0032 Find a file that matches a String with Wildcards
VA evt_FileInput -> szFileorPathToFind
VA evt_FileInput <- szFoundFileorPath
0033 VA evt_PathInput = concat([VA evt_PathInput],[VA evt_FileInput])
0034 //
0035 End If
0036 //
0037 VA evt_ElectronicAddressType = "E"
0038 VA evt_LineNumberID = "0"
0039 F01151.Select
PC Address Number (F58CLD01) = TK Address Number
VA evt_LineNumberID = TK Who's Who Line Number - ID
VA evt_ElectronicAddressType = TK Electronic Address Type
0040 F01151.Fetch Next
VA evt_VendorEmailAddress <- TK Electronic Address
If SV File_IO_Status is equal to CO SUCCESS
0041 VA evt_Subject = concat("ACH Payment Detail - Vendor #",concat([PC Address Number (F58CLD01) (AN8)],concat("_",[SL DateToday ] )))
0042 Send E-Mail - HRM
PO EmailFrom -> szFrom
VA evt_VendorEmailAddress -> szTo
PO EmailTo -> szCC
VA evt_Subject -> szSubject
<Blank> -> szMessageTextChar256
"1" -> cIncludeAttachmentFlag01
VA rpt_DirectoryPath -> szNameOfAttachmentFile
0043 End If
Note - It is important that this piece of code is placed at the Report Level ER because you want to retrieve the pdf after the entire report is completed.
I hope this helps you. Good luck!