• Introduction
  • Tutorial
  • User guide
  • SDK
  • Examples
  • Inline content example

    Here’s an example of sending canvas image as attachment.

    To run this example create a template with an attachment of type “inline content”. The content of the attachment should be set to “{{{content}}}”.

    Note that the content should be passed in base64 format. In the example above the toDataURL() method returns data encoded already to base64. To encode arbitrary content to base64 use btoa() method.