We are using SendGrid latest JAVA API's available to send emails. As part of attachment we are attaching a pdf enclosed in a zip file.
While sending mail we are getting 404 as response code and error message stating The attachment content must be base64 encoded
Complete Error Message: _{"errors":[{"message":"The attachment content must be base64 encoded.","field":"attachments.0.content","help":"http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.attachments.content"}]}_
Wanted help if we are doing anything wrong and need more clarity how can we solve this issue.
Please find attached code snippet.
We are using SendGrid latest JAVA API's available to send emails. As part of attachment we are attaching a pdf enclosed in a zip file. While sending mail we are getting 404 as response code and error message stating The attachment content must be base64 encoded Complete Error Message: _{"errors":[{"message":"The attachment content must be base64 encoded.","field":"attachments.0.content","help":"http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.attachments.content"}]}_
Wanted help if we are doing anything wrong and need more clarity how can we solve this issue. Please find attached code snippet.
Code Snippet :
Error :
Complete Error Message: _{"errors":[{"message":"The attachment content must be base64 encoded.","field":"attachments.0.content","help":"http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.attachments.content"}]}_
Using Maven Repo :
Sheet 1(1).zip