nodemailer-sendgrid
nodemailer-sendgrid copied to clipboard
Attachment filename and contentType are removed upon normalization
Packages used:
nodemailer-sendgrid v.1.0.3
nodemailer v.4.7.0
@andris9 I understand that this is setup such that all attachments are normalized to base64 strings.
The issue I am running into is that after this normalization happens, it removes the filename
and contentType
fields from the attachments, only returning the base64 string in the content
field.
This causes SendGrid API to respond with this error message:
{ errors:
[ { message: 'The attachment filename parameter is required.',
field: 'attachments.0.filename',
help: 'http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.attachments.filename' } ] }
Do you have any feedback as to why filename
and contentType
aren't surviving the normalization?
Let me know if you need any additional info.
Thanks!