0

In Drupal 8, uploaded image files sent to a Webform are uploaded to a private area. The image files are referenced in the email that is sent to the administrator for that form, but unless they are logged in and access the email through the webforms results interface, they cannot see the file. It appears as a broken image in the HTML email.

I've installed SwiftMailer and Mail System modules per https://www.drupal.org/node/2837024 but installing and enabling the modules has not solved the problem.

0

The steps to get uploaded files to be sent as attachments to be included in emails from Webforms go as follows:

  1. Install SwiftMailer and Mail System Modules
  2. In Mail System Module Configuration, add Webform Module and set Handler and Mailer to Swift Mailer
  3. In Swift Mailer Configuration, Messages tab, set to HTML (may not be necessary, but it worked for me.
  4. In Structure..Webforms..[your webform name]..Settings..Email/Handler..Edit..Advanced Tab set the check box for include files as attachments

The body of the email still has a broken image, but the files are attached. I believe I can modify the body of the email to just include the fields that I want by expliciting naming each one, however, if you uncheck the fields that are "broken" in Included Email Values (hoping to continue to use [webform_submission:values] in the body template) the email does not show the broken connection but it also no longer includes the attached file(s)

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.