Webform Attachment sub-module provides webform elements which generate or load files that can be attached to a webform submission and an email handler.
Sending email attachments
- To send email attachments, please install and configure the SMTP Authentication Support module or the Mail System and SwiftMailer module
- Make sure to check 'Include files as attachments' in your email handlers
- Then add 'File upload' or 'Attachment' elements to your webform
Notes
- Attachments can be defined using tokens, Twig, or a URL.
- Attachments may be linked to directly from a webform submission.
- Attachment element supports custom file names and link text.
Comments
webform_attachment - url issue
drupal 9.2.0
webform_attachment 6.1.0
Jacob, thanks for work accomplished !
Sending custom email attachments is probably one of the most awaited features of webform6
Following info may help some users for sending email with attachments
Settings:
"Public local files served by the webserver" in File system /admin/config/media/file-system
"Attachment URL" element added with Add element button in the Build tab of the webform
Issue:
Editing settings of "Attachtement URL" element has caused some confusion on my side
Using "Open File Browser" in "URL/path" will successfully browse public:// directory
but the returned value after selecting a file (/sites/default/files/FILENAME) is not immediatly functional in my case.
Please note that public://sites/default/files/FILENAME or various combinaisons seem not acceptable url formats
Combinaisons of Private local files and url using private:// seem not functional
Solution for me has been the following url :
http://localhost/sites/default/files/FILENAME
Enjoy
Works with Drupal Symfony Mailer for Drupal 9 and 10
Just a note to clarify that the Webform Attachments functionality works with Drupal Symfony Mailer, which is the replacement for the (now deprecated) SwiftMailer and Mailsystem setup. Also worth noting that Drupal Symfony Mailer module does not require the Mailsystem module, as DSM provides a similar "Transport" functionality out of the box. DSM also has the ability to setup "SMTP" as the mail transport handler so the SMTP module is no longer required to achieve smtp functionality mentioned in this CR.
Bug add attachment URL
Bonjour ,
j'ai activé le sub-modume webform attachment pour pouvoir inclure des attachements dans le le mail de confirmation.
Lorsque j'ajoute un élément add attachment URL , il veut pas l'enregistrer dans mon webform.
version webform : 8.x-5.8
Merci.
Kaouther