sendinblue / APIv3-nodejs-library

SendinBlue's API v3 Node.js Library
ISC License
102 stars 47 forks source link

Attachment error in transactional email #132

Closed omeriko closed 2 years ago

omeriko commented 2 years ago

Hi guys

I've started working with the REST API v3. I'm trying to send a transactional email with an attachment using the library's sendTransacEmail function.

If I pass a SendSmtpEmail object that has no attachment - all is well, the email is being sent and received correctly.

However when i try to add an attachment to the email object, things get erroneous. I add an attachment property to the SendSmtpEmail in order to attach a pdf file to the email message.

sendSmtpEmail.attachment = [{name: "the_name_of_the_file.pdf", content: "data:application/pdf;base64, JVBER....Rg==" }]; I set the content property to the base64 representation of the pdf file.

The email is being sent with the attachment, however when i try to open the attachment - it cannot be opened, i get a message as if the file has been damaged.

Regards, Omer

Screen Shot 2022-10-03 at 11 22 15
shubhamUpadhyayInBlue commented 2 years ago

Hi @omeriko That is strange. This library does not modify the attachment that you send. It sends it internally using the API mentioned here.

It looks like a specific case in which it would be good if we have access to the pdf you sent so that we can try to replicate it on our side. I suggest you open a support ticket. Please go to this link when you log in to your Sendinblue account. We will be able to help you better and in a more personalized way.

Happy to help!

shubhamUpadhyayInBlue commented 2 years ago

Closing the issue since there is no activity for more than 11 days. Kindly open another issue if you face it again. Thanks!