I recently had a need where following completing a webform, I needed to have the emailed confirmation include an attachment. The attachment is the same for all users who complete the survey. What I encountered is that there isn't currently a way for the webform node creator to specify an attachment to be included. Only a webform component containing a file can be included.

Is there any consideration for including this feature as an admin option in future webform releases? I'd be happy to give this a go if it might be included.

Comments

quicksketch’s picture

The attachment is the same for all users who complete the survey.

If you want to attach the same attachment to all e-mails, I suggest using a custom module an implement hook_mail_alter() to add the attachment before MIME Mail module sends out the e-mail. The entire Webform node and submission is included in the $params array, making it so you can conditionally add this attachment as needed for just e-mails sent by this one Webform.

Is there any consideration for including this feature as an admin option in future webform releases?

Probably not. Other modules have provided a similar functionality through an add-on contrib module, such as the Webform2PDF module, which allows you to send a templated PDF as an attachment to all users who fill out the form. Such functionality through the UI would probably be similarly added by another contrib module and not by Webform itself.

quicksketch’s picture

Category: feature » support
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.