Adding a PDF attachment to Sendgrid Email Service
Hi there,
I have some code set up to generate a PDF file of some data generated for our users and we want them to be able to email it out. I have the email service working and the PDF generation working, but I'm having trouble attaching the PDF to the email. The email is sent using the Sendgrid API service plugin so all the data it's getting is passed to it with the following format.
{
'PATH': ['text'],
'TYPE': 'STRING',
'ID': 'Message',
'ATTR': 'value'
}, {
'PATH': ['from'],
'TYPE': 'STRING',
'ID': 'From',
'ATTR': 'value'
}, {
'PATH': ['files'],
'TYPE': 'OBJECT',
'ATTR': '[test.pdf]=@test.pdf'
Code: Select all
} I've really haven't had much luck tracking down documentation on how to add attachments with the plugin for Appery. Does anyone know how the code has to be set up for the service to add attachments? Is there a way I can point it to the PDF file sitting at the root directory of the device?