Email Attachments

Hi Rafig,

Thanks, that seems to be mostly working but every time I try to open the attachment I have sent it’s a broken file.

Here’s my code:

plugins.mail.createTextAttachment(foundset.order_uuid + '.pdf', scopes.global.pdfPath('Customer_Orders') + foundset.order_uuid + '.pdf')

The error message I get is:

The file “file.pdf” could not be opened.
It may be damaged or use a file format that Preview doesn’t recognise.

Thanks,
Alasdair