I've been struggling with an issue today that I just can't seem to figure out.

I have a webform that includes a file upload that I want to email upon submission.

The email sends correctly (using MIMEmail modules) but there is no attachment.

The webform is for job application.The user will upload the resume and portfolio. The hr and manager want to get mail along with attachment.How they can always be logged into site that is quite impossible. Now the issue is the who ever logged into the site only can see the attachment when click on the link. How to sent attachment from private folder as attachment not just in link(want proper attachment)

I'm running drupal 8. USed modules are webform, mime mail, mail system and also tried swift mailer.

But in webform module mail settings , there is "Include files as attachments" i checked that option. Still it is not working.

1 Answer 1


Out of the box Drupal 8 doesn't support file attachments. Take a look at this module and read the steps on the page: https://www.drupal.org/project/swiftmailer`

The Swift Mailer module extends the basic e-mail sending functionality provided by Drupal by delegating all e-mail handling to the Swift Mailer library. This enables your site to take advantage of the many features which the Swift Mailer library provides, such as :

  • Sending e-mails directly through a SMTP server of your choice, a locally installed MTA agent such as sendmail or the mail functionality provided by PHP.
  • Sending HTML (MIME) e-mails.
  • Adding file attachments to e-mails.
  • Adding inline images to e-mails.

Also take a look at this: https://www.drupal.org/node/2821590

  • 2
    Please improve your answer to better explain what you mean (it shows up in the "low quality review queue") ... right now it's close to a link-only answer. Feb 8, 2017 at 20:07
  • But in webform module mail settings , there is "Include files as attachments" i checked that option. Still it is not working.
    – steniya
    Feb 9, 2017 at 9:23
  • Please take a look at the Webform 8.x-5.x Features documentation here: drupal.org/node/2837024 It clearly states: File attachments (requires the Mail System and Swift Mailer module.) Feb 9, 2017 at 19:38
  • @Jose Tavares thanks. I goes through the documentation, but it not yet cleared my requirement. Mail is sending but the attachment sending is as link. And who ever logged as admin can only see the file. Because the file is private. How to send this private file as a mail attachment. Logged in and checking mail attachment is not practical thing.
    – steniya
    Feb 10, 2017 at 5:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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