DEV Community

Discussion on: Send mails using NodeJS

Collapse
drsimplegraffiti profile image
Abayomi Ogunnusi Author

@Suchitra

Do you have a folder where your image is stored?

Example:

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

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