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:


return array(

'sproutForms' => 'enableFileAttachments',


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

  • Have you added enctype="multipart/form-data" to your <form> tag? Jun 23 '15 at 11:55
  • 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 Jun 23 '15 at 11:58
  • 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. Jun 23 '15 at 12:03
  • Oh okay, instead of adding a config.php into the plugin folder, have you tried adding it to your general.php config? Jun 23 '15 at 12:07
  • Just tried that again but no luck I'm afraid Jun 23 '15 at 12:15

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

  1. The hidden config setting should be set in the craft/config/general.php file

  2. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.