I’m using the Node SDK (version 7.2.1), and I’m experiencing a problem:
What is the best way to send an inline attachment? Base64? Because in the docs I saw that it is sending the attachment ID, but how can I get an attachment ID if the attachments don’t have a POST endpoint?
Oh, that’s sad, but okay. @ram I found another problem (I guess):
I’m trying to send a draft with attachments, but I can’t. When I send a message, it’s all ok (I do it with a single file less then 3MB, greater then 3MB, e multiple files). But, trying to send with a draft, when a file is less then 3MB, it send the email without the attachment, and, when the file has more then 3MB, it throws me an error NOT_IMPLEMENTED. Can you see this to me?
Remembering:
All errors is only when I do it with Nylas.drafts.update function (or, when have only <3MB files, Nylas.drafts.send don’t send the attachment). When I send with Nylas.messages.send function, it works fine.
Hey @ram, I saw this when they merged and version 7.4.0 arrived, but my biggest problem is: in Nylas v3 I’m sending inline attachments as base64, but gmail doesn’t accept base64 in the email body. In Nylas v2 there was a file post endpoint, so I sent the file and received the ID, and with that I changed the img src to cid:<file-id>, which is impossible to do in v3. How can I do this?
Hi @VictorMonteiro7 just checking some notes on this and Nylas API v3 does not have a file upload endpoint, only attaching files as part of email draft / send endpoints.
I see that gmail doesn’t accept base64, this may be something you need to implement for. I would try recommend you to consider what other formats or approaches you can consider for adding images to an email body.
Hey @ram, I solved the problem.
The Nylas doesn’t have the POST /attachments endpoint anymore, but, I understood that I have to send the attachment with a generated ID and change the src on image.
So, instead use an endpoint to send an image, I just generated in our side an uuid and send the attachment with is_inline parameter.
@ram@VictorMonteiro7
I tried using the /send endpoint with in_line parameters for attachments, but the email content is still not displaying as inline when sent to Outlook. Can you help me figure out what might be going wrong?