# Email Node, Not Attaching All files: Security reasons?

**URL:** <https://discourse.nodered.org/t/email-node-not-attaching-all-files-security-reasons/45790>\
**Category:** General\
**Created:** [17 May 2021 15:01 UTC](https://discourse.nodered.org/t/email-node-not-attaching-all-files-security-reasons/45790 "2021-05-17T15:01:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrSidX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrsidx/32/18935_2.png) [@mrSidX](https://discourse.nodered.org/u/mrSidX)\
**Post date:** [17 May 2021 15:01 UTC](https://discourse.nodered.org/t/email-node-not-attaching-all-files-security-reasons/45790/1 "2021-05-17T15:01:04Z")

</div>

I have an email out node that won't take in an attached `settings.js` file.

The node I constructed obtains the `flows.json` file automatically with the `package.json` and `settings.js` files.

Errors when I include the settings... When I omit the settings file attachment, the email sends as intended.

I'm using Gmail, and I'm curious what's causing the error. Does Google not like `.js` files attached?

I just now changed the nodemailer object to change the `settings.js` to `settings.js.bak` suffix, and it works. I'm guessing this is a security thing on Google's end?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 May 2021 15:22 UTC](https://discourse.nodered.org/t/email-node-not-attaching-all-files-security-reasons/45790/2 "2021-05-17T15:22:31Z")

</div>

> [@mrSidX](#):
>
> I'm guessing this is a security thing on Google's end

I think that is probably a good guess. Sending executable files is one of the ways hackers try to attack systems. If you can get your target to open an attachment and the os sees that it is an executable and runs it then you are 90% of the way there.

---

<div class="post-metadata">

**Author:** ![mrSidX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrsidx/32/18935_2.png) [@mrSidX](https://discourse.nodered.org/u/mrSidX)\
**Post date:** [17 May 2021 16:33 UTC](https://discourse.nodered.org/t/email-node-not-attaching-all-files-security-reasons/45790/3 "2021-05-17T16:33:52Z")

</div>

I agree, I feel this is along the lines of security limitations via the Google platform.

It's no big deal in this case scenario, renaming the file and such, as I only need the backups.

---

<div class="post-metadata">

**Author:** ![Nathanli](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@Nathanli](https://discourse.nodered.org/u/Nathanli)\
**Post date:** [18 May 2021 03:30 UTC](https://discourse.nodered.org/t/email-node-not-attaching-all-files-security-reasons/45790/4 "2021-05-18T03:30:23Z")

</div>

I agree, I think so too.

---

<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:** [17 July 2021 03:30 UTC](https://discourse.nodered.org/t/email-node-not-attaching-all-files-security-reasons/45790/5 "2021-07-17T03:30:31Z")

</div>

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