DEV Community

Discussion on: Send mails using NodeJS

Collapse
suchitra_13 profile image
Suchitra

I kept image file in same folder where my index.js is present.
So in this case I just wrote:

attachment: [{
filename: "robocop.jpg", path: "robocop.jpg"}]
};

But it is not working:(

Thread Thread
horomancer profile image
horomancer

shouldn't it be

path: "./robocop.jpg"
Enter fullscreen mode Exit fullscreen mode