No Attachments option on Edit Email confirmation handler

Created on 11 December 2024, 8 days ago

No Attachments option on Edit Email confirmation handler

I enabled webform_attachment on my Drupal 10 site with a fully functional Webform. But there is no Attachments option on Edit Email confirmation handler.

Steps to reproduce

  1. DDEV environment
  2. Drupal core 10.3.10
  3. PHP 8.1
  4. Webform 6.2.8
  5. SMPT 8.x-1.4 (all set it up on /admin/config/system/smtp)
  6. Enable webform_attachment

Webforms and emails are working correctly. But under /admin/structure/webform/manage/contact/handlers on Edit Email confirmation handler of the form there is no Attachments option. The form attachment fields are displaing and working correctly.

I need this because I have to include an Add to Calendar button to the confirmation email. Therefore I would like to attach an ICS file generated with my custom module.

πŸ› Bug report
Status

Active

Version

6.2

Component

Code

Created by

πŸ‡ΉπŸ‡·Turkey titacvetkovic

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @titacvetkovic
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    Is " Include files as attachments" disabled or enabled?

  • πŸ‡ΉπŸ‡·Turkey titacvetkovic

    Thank you for replying Jacob! Well that's the strange thing: I don't get the Attachments section under Settings > Email / Handlers > Add email. So I am unable to enable "Include files as attachments". I tried all sorts: added a new email, updated the webform module, updated the webform_attachment module, uninstalled and reinstalled webform module, re-enabled the webform_attachment module, restarted DDEV, etc.

  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    If "Include files as attachments" is not checked, it means that something is not configured as expected.

    @see https://git.drupalcode.org/project/webform/-/blob/6.3.x/src/Plugin/Webfo...
    @see https://git.drupalcode.org/project/webform/-/blob/6.3.x/src/Plugin/Webfo...

    Either the email handler or the webform attachments is not setup.

    You could try to

    • Confirm that smtp is enabled.
    • Make sure an attachment field is added to the form
    • Experiment with adding a file upload to see if attachments are enabled.
    • Upgrade to 6.3.x
  • πŸ‡ΉπŸ‡·Turkey titacvetkovic

    I can confirm all the below:

    • SMTP is enabled and all set up.
    • The attachment field is added to the form (I tested it with and without)
    • I experimented with adding a file upload, so the attachments section was finally visible, but the "Include files as attachments" was inactive.
    • I upgraded to 6.3.x.

    I am in a bit of a rush, because the form is to register to an event. I wanted to attach the ICS file I generated for an Add to Calendar option. I'll just hardcode the link to the email body instead.

    Thanks for the tips, though. Maybe it could be useful to have an option to simply include attachments without having to add an attachment field to the form.

  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    We should close this ticket as long as you have a workaround and no one else is reporting this issue.

Production build 0.71.5 2024