Skip to content

Uncaught error when content is loaded from file #1

@gergoerdosi

Description

@gergoerdosi

Nodemailer supports loading content from a file:

var mail = {
   data: {
       html: {
           path: __dirname + '/fixtures/message.html'
       }
   }
};

An error is raised when this plugin is used:

    TypeError: Uncaught error: Object <p>example</p>
 has no method 'replace'
    at replaceBase64Images (/.../node_modules/nodemailer-plugin-inline-base64/src/replaceBase64Images.js:2:16)

This is happening because Nodemailer returns a buffer when a file is loaded, not a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions