Hi,
I have a foscam camera that provides a screenshot via the following url,
http://192.168.1.170/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=myusername&pwd=mypassword
this then feeds into the following function which then goes into an email node. (I found this on the old google group forum, so it’s not something I have built myself)
[{"id":"24bd4c05.ab64a4","type":"change","z":"7141ede8.f151a4","name":"Flow 4 : Setup mail content","rules":[{"t":"set","p":"attachments","pt":"msg","to":"[{\t \"filename\": 'camera_snapshot.jpg', \t \"path\": '/tmp/local_image.jpg',\t \"content\": $$.payload\t}]","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Result flow 4","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Dear,<br><br>Your PIR detector has detected movement in the living room.<br>In attachment you can find the file that was locally stored.<br><br>Kind regards,<br>Your Node-Red flow","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":480,"wires":[["8cde2b21.2ff708"]]}]
The problem I have is that the email created has a jpg file attached but it is not visible.when I try to open it.
Any ideas,