i have wrote a script to send a email, i’ve got it from the inductiveuniversity.
#send as email
#get the data
fileName = “Report.pdf”
fileData = event.source.parent.getComponent(‘Report Viewer’).getBytesPDF()
system.net.sendEmail(smtp, sender, subject, body, 0, recipients, [fileName], [fileData])
but i still have an error and don’t know whats wrong
thanks in advance.