Looking to send email with a file.
Not in the body of the email but as a downloadable attachment
Welcome
How to do that is explained in the help section for the stock node-red-node-email node. You assign msg.attachments to an array of your file names.
Create something like this before the email node (in a function node for example):
msg.attachments = [{
filename: 'your-filename', // file on disk as an attachment
path: '/path/to/your-filename' // stream this file
}]
Thanks no I
Still posts to file data to body of email
Maybe I got my flow wrong?
Should I be using read file ?
Export your flow and paste it to a reply so people can look at what you are doing.
In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```
)
```
code goes here
```
You can edit and correct your post by clicking the pencil icon.
See this post for more details - How to share code or flow json
Nice picture but that is not an export of your flow.
lol sorry
Still not an export of your flow unfortunately.
Select the nodes that are relevant to the problem and then select Export in the dropdown menu (or CTRL+E). Then select Copy to Clipboard and paste it in a reply here. When pasting use the </>
button at the top of the forum entry window so it is formatted correctly for the forum.
In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```
), which is what the </>
button does.
```
code goes here
```
See this post for more details - How to share code or flow json
Looking at your debug - you seem to have crossed the wires... You probably want msg.attachments[0].filename
to be "salem_2024090419.csv" and msg.attachments[0].content
to be msg.payload (ie the buffer)