I have webform2pdf working and attaching a PDF with DefaultMailSystem. However, I need to attach it to an HTML email. Is this possible? If I use MimeMailSystem the PDF appears as base64 e.g.

--------------f8320f3c70057976d012fb8890eda7b8 Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: 8bit
<html email content>
-------------f8320f3c70057976d012fb8890eda7b8 Content-Type: application/pdf; name="webform_submission-3871-777.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="webform_submission-3871-777.pdf" JVBERi0xLjYKJeLjz9MKNSAwIG9iago8PCAvVHlwZSAvUGFnZSAvUGFyZW50IDEgMCBSIC9MYXN0 TW9kaWZpZWQgKEQ6MjAxNzEwMDYxMDU5MjErMDEnMDAnKSAvUmVzb3VyY2VzIDIgMCBSIC9NZWRp....

I can see others have had this issue, but I can't find a solution. Any help or information appreciated.

Comments

elsmore created an issue. See original summary.

davide.porrovecchio’s picture

Possible duplicate of https://www.drupal.org/node/2911898 ?

elsmore’s picture

Applied referenced patch. Did not work, unfortunately.

jeffm2001’s picture

Status: Active » Closed (duplicate)
Parent issue: » #2911898: Error with mimemail

Closing as duplicate of #2911898: Error with mimemail. As noted there, the solution is to enable "HTML mail system" in the webform settings, but you will also need the patch from that issue.