<p>It looks like your on the right track but there may be a couple issues that we need to address:</p>

<ol>
<li><p>The hidden config setting should be set in the <code>craft/config/general.php</code> file</p></li>
<li><p>The <code>enableFileAttachments</code> config setting should also be within an array and set to <code>true</code>:</p>

<pre><code>return array(
  'sproutForms' =&gt; array(
    'enableFileAttachments' =&gt; true,
  )
);
</code></pre></li>
</ol>

<p><em>Note: As of this posting, we handle this functionality as a hidden config setting because we are still refining it's behavior. At some point, this will likely be easier to do directly from the Control Panel.</em></p>

CC BY-SA 3.0
2015-06-23T18:46:02.870Z
2015-06-23T18:46:02.870Z
Ben Parizek
<p>I am trying to add file attachments on the notification emails sent out by sprout forms plugin. Looking in the docs it looks like I need to add hidden config setting within the plugin.</p>

<p>I have created a config.php file in the plugin directory and put the following code in it:</p>

<pre><code>&lt;?php

return array(

'sproutForms' =&gt; 'enableFileAttachments',

);
</code></pre>

<p>However, when I receive a notification email it still doesn't have the attachment. Can anyone suggest what I'm doing wrong? </p>

CC BY-SA 3.0
2015-06-23T11:55:10.023Z
Have you added `enctype="multipart/form-data"` to your `<form>` tag?
Alec Ritson
CC BY-SA 3.0
2015-06-23T11:58:41.160Z
Hi Alec, yep I've added that to my form. Everything saves correctly, asset is uploaded,notification email is sent and shows the name of the file but the only thing not happening is the asset being attached to the email
Dave Coggins
CC BY-SA 3.0
2015-06-23T12:03:45.293Z
I'm pretty sure it is to do with the config because of the message in the sprout forms log file: 2015/06/23 08:39:08 [info] [plugin] File attachments are currently not enabled for Sprout Forms.
Dave Coggins
CC BY-SA 3.0
2015-06-23T12:07:06.720Z
Oh okay, instead of adding a `config.php` into the plugin folder, have you tried adding it to your `general.php` config?
Alec Ritson
CC BY-SA 3.0
2015-06-23T12:15:44.777Z
Just tried that again but no luck I'm afraid
Dave Coggins
CC BY-SA 3.0
2015-06-23T17:29:17.803Z
Probably worth pinging the Barrel Strength Design team to clarify if it's a bug or just a config setting you're missing.
Brad Bell
<plugin-sproutforms>
How to add attachments to emails with sprout forms
# How to add attachments to emails with sprout forms

(Asked by: username_0 on 2015-06-23)

I am trying to add file attachments on the notification emails sent out by sprout forms plugin. Looking in the docs it looks like I need to add hidden config setting within the plugin.
I have created a config.php file in the plugin directory and put the following code in it:
 'enableFileAttachments',

);

However, when I receive a notification email it still doesn't have the attachment. Can anyone suggest what I'm doing wrong?

**Tags:** plugin-sproutforms

> **Comments:**
> **username_1**: Have you added `enctype="multipart/form-data"` to your `<form>` tag?  
> **username_0**: Hi Alec, yep I've added that to my form. Everything saves correctly, asset is uploaded,notification email is sent and shows the name of the file but the only thing not happening is the asset being attached to the email  
> **username_0**: I'm pretty sure it is to do with the config because of the message in the sprout forms log file: 2015/06/23 08:39:08 [info] [plugin] File attachments are currently not enabled for Sprout Forms.  
> **username_1**: Oh okay, instead of adding a `config.php` into the plugin folder, have you tried adding it to your `general.php` config?  
> **username_0**: Just tried that again but no luck I'm afraid  
> **username_2**: Probably worth pinging the Barrel Strength Design team to clarify if it's a bug or just a config setting you're missing.  

---

## 1 answers

### Answer by username_3 on 2015-06-23. Score: 1 | Accepted answer

It looks like your on the right track but there may be a couple issues that we need to address:

The hidden config setting should be set in the craft/config/general.php file
The enableFileAttachments config setting should also be within an array and set to true:
return array(
  'sproutForms' => array(
    'enableFileAttachments' => true,
  )
);


Note: As of this posting, we handle this functionality as a hidden config setting because we are still refining it's behavior. At some point, this will likely be easier to do directly from the Control Panel.


---

