# Fetch image and send to email

**URL:** https://discourse.nodered.org/t/fetch-image-and-send-to-email/43738
**Category:** General
**Created:** [6 April 2021 03:31 UTC](https://discourse.nodered.org/t/fetch-image-and-send-to-email/43738 "2021-04-06T03:31:33Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 April 2021 07:00 UTC](https://discourse.nodered.org/t/fetch-image-and-send-to-email/43738/2 "2021-04-06T07:00:23Z")

</div>

> [@jcarreira](#):
>
> I found this change node elsewhere in the forums, but it's not working for me

So the main part of that change node is where it sets up the attachment...

JSONata...

```auto
[{
 "filename": 'cam_' & $replace($now(),":","_") & '.jpg', 
 "content": $$.payload,
 "cid": "" & cid & ""
}]

```

Does the `msg` going into this change node have a property `msg.cid` and is the image buffer in `msg.payload`?

---

_[View the full topic](https://discourse.nodered.org/t/fetch-image-and-send-to-email/43738)._
