# Read an IMAP email and save it to a file

**URL:** https://discourse.nodered.org/t/read-an-imap-email-and-save-it-to-a-file/52908
**Category:** General
**Created:** [28 October 2021 19:25 UTC](https://discourse.nodered.org/t/read-an-imap-email-and-save-it-to-a-file/52908 "2021-10-28T19:25:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![crester](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crester/32/21997_2.png) [@crester](https://discourse.nodered.org/u/crester)
#### Post date: [28 October 2021 19:25 UTC](https://discourse.nodered.org/t/read-an-imap-email-and-save-it-to-a-file/52908/1 "2021-10-28T19:25:54Z")

</div>

Hello.  
I need to read an e-mail using **e-mail node** and save it RAW to an eml file.  
As I receive the json object, I wonder if it is possible to do with this mechanism

Thank you  
Regards.  
J

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [28 October 2021 20:07 UTC](https://discourse.nodered.org/t/read-an-imap-email-and-save-it-to-a-file/52908/2 "2021-10-28T20:07:10Z")

</div>

You would have to try and reconstruct it from the object, there is no raw feed of the message provided by the underlying library as far as I can tell ([imap - npm](https://www.npmjs.com/package/imap))

---

<div class="post-metadata">

### Author: ![crester](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crester/32/21997_2.png) [@crester](https://discourse.nodered.org/u/crester)
#### Post date: [28 October 2021 21:34 UTC](https://discourse.nodered.org/t/read-an-imap-email-and-save-it-to-a-file/52908/3 "2021-10-28T21:34:53Z")

</div>

difficult to rebuild  
Perhaps another way to do avoiding e-mail node?

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [29 October 2021 08:14 UTC](https://discourse.nodered.org/t/read-an-imap-email-and-save-it-to-a-file/52908/4 "2021-10-29T08:14:30Z")

</div>

Probably not, unless you want to manually try and re-implement the IMAP protocol with the TCP node (and that assumes no TLS)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [28 December 2021 08:14 UTC](https://discourse.nodered.org/t/read-an-imap-email-and-save-it-to-a-file/52908/5 "2021-12-28T08:14:45Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
