Hi, Thank You for providing the snippet. I tried this way to attach my file, I was getting the File path as well but when I pass the filepath in the BRApi.Utilities.SendMail(...) function I was getting an error.
Could not find a part of the path 'C:\Program Files\OneStream Software\OneStreamAppRoot\OneStreamApp\Documents\Public\File.csv
Code:
Dim failGracefully As Boolean = True
Dim includeContentFileBytes As Boolean = True
Dim objXFFileEx As XFFileEx = BRApi.FileSystem.GetFile(si, FileSystemLocation.ApplicationDatabase, "Documents\Public\File.csv", includeContentFileBytes, failGracefully)
Dim fullNamePath As String = objXFFileEx.XFFile.FileInfo.FullName
Dim attachmentFilePaths As List(Of String) = New List(Of String)() From {
fullNamePath
}
BRApi.Utilities.SendMail(si, emailConnectionName, toEmail, subject, Msg, True, attachmentFilePaths)