0

I added the trigger email extension to my firebase project and it works well. I am now trying to send an email with an attachment from firebase storage. I tried adding the access token of the file to the content field of the message and the email is sent with the corresponding file (in this case a pdf file) but when I try to open it, it is corrupted. Am I doing something wrong or is it just not possible to attach files from storage?

Amit Goft
  • 33
  • 5

1 Answers1

0

it is possible to send an attachment with this extension.

Could you provide an example of how you are adding this attachment? For example:

  • A link to a file source
  • Base 64 included content

A link to a file would look like

attachments: [
  {
    content: "invoice",
    filename: "{{invoice_link}}",
  },
],

Base 64 content would be similar to:

attachments: [
  { content: "dGhpcyBpcyBhIHRlc3Q=" // base64 string
    encoding: "base64"
    filename "ImportantDocument.pdf"
  }
]
Darren Ackers
  • 148
  • 1
  • 6