Email attachments are not being sent as expected, at least in a webform submissions scenario.

Steps to reproduce:
- Create a webform with a file upload element
- Configure that webform to send out submissions with uploaded files as attachments on the submission email
- Fill out the webform with an uploaded file

The following error will appear:

Warning: file_exists() expects parameter 1 to be a valid path, array given in Drupal\mailgun\Plugin\Mail\MailgunMail->mail() (line 203 of /app/docroot/modules/contrib/mailgun/src/Plugin/Mail/MailgunMail.php)

and no attachment will be present on the email that is sent out.

Note: I haven't tested this on other email attachments, only webforms.

CommentFileSizeAuthor
#2 3050525-2.patch1.29 KBmarcoscano
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcoscano created an issue. See original summary.

marcoscano’s picture

Assigned: marcoscano » Unassigned
Status: Active » Needs review
FileSize
1.29 KB

This seems to solve the issue for me.

AID_UA’s picture

3050525-2.patch

Tested. It works for me too.

pcambra’s picture

Status: Needs review » Reviewed & tested by the community

This works great, I think a separate issue should be opened to support 'filecontent' as well (https://github.com/mailgun/mailgun-php/blob/master/doc/attachments.md)

Matroskeen’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-1.x.
Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.