Attachment error in transactional email
omeriko opened this issue · 2 comments
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.
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!
Closing the issue since there is no activity for more than 11 days. Kindly open another issue if you face it again.
Thanks!