public function WebformElementAttachmentInterface::getEmailAttachments in Webform 6.x
Get files as email attachments.
This is also used to export attachments.
Parameters
array $element: An element.
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.
array $options: An array of options.
Return value
array An array containing email attachments which include an attachments 'filename', 'filemime', 'filepath', and 'filecontent'.
See also
\Drupal\webform\Plugin\WebformHandler\EmailWebformHandler::getMessageAttachments
\Drupal\mimemail\Utility\MimeMailFormatHelper::mimeMailHtmlBody
\Drupal\smtp\Plugin\Mail\SMTPMailSystem::mail
\Drupal\swiftmailer\Plugin\Mail\SwiftMailer::attachAsMimeMail
3 methods override WebformElementAttachmentInterface::getEmailAttachments()
- WebformAttachmentBase::getEmailAttachments in modules/
webform_attachment/ src/ Plugin/ WebformElement/ WebformAttachmentBase.php - Get files as email attachments.
- WebformCompositeBase::getEmailAttachments in src/
Plugin/ WebformElement/ WebformCompositeBase.php - Get files as email attachments.
- WebformManagedFileBase::getEmailAttachments in src/
Plugin/ WebformElement/ WebformManagedFileBase.php - Get files as email attachments.
File
- src/
Plugin/ WebformElementAttachmentInterface.php, line 33
Class
- WebformElementAttachmentInterface
- Defines the interface for webform elements can provide email attachments.
Namespace
Drupal\webform\PluginCode
public function getEmailAttachments(array $element, WebformSubmissionInterface $webform_submission, array $options = []);