I'm trying to use webform2pdf to generate a pdf containing form inputs. The form works fine if I don't check "Generate PDF Document", and I receive a confirmation email.

If I do enable the PDF, I don't receive a confirmation email and I get the following error:

Unable to send e-mail. Contact the site administrator if the problem persists.

In the smtp log I see:

phpmailerException: Message body empty in PHPMailer->Send() (line 577 of /var/www/clients/client1/web1/web/sites/all/modules/smtp/smtp.phpmailer.inc).

Is there additional configuration I need to make? Drupal is new to me.

  • Drupal - 7.54
  • Webform - 7.x-4.15
  • Webform 2 PDF - 7.x-4.0
  • SMTP Authentication Support - 7.x-1.6
  • MIME Mail - 7.x-1.0
  • TCPDF - 6.2.13

** Edit **

Turning off SMTP Authentication Support and using DefaultMailSystem solved this particular issue and allows PDF attachements, although DefaultMailSystem only allows plain text emails.


Webform2PDF has dependencies, did you install them?

Third-party tools:

    • 4.5.000 or later required from webform2pdf 2.x or 3.x
    • 6.0.000 or later required from webform2pdf 4.x
| improve this answer | |
  • Sorry, forget to mention that. Yes, 6.2.13. Coped to sites/all/libraries/tcpdf rather than installed. – user2265915 Oct 4 '17 at 14:55
  • are there any errors messages in your php error log, dblog, etc. Check your server log files. – tenken Oct 4 '17 at 19:36
  • There are no errors in the server log files. Admittedly I added "error_log" to php.ini and it's not being picked up. It's definitely the right php.ini and it's not being overidden by .htaccess. As for the original issue, I have noticed the PDF files are being created, as I can view them via the CMS. So I guess that rules out any issue with TCPDF. – user2265915 Oct 5 '17 at 17:01
  • 1
    Turning off SMTP Authentication Support resolves the issue, and I can receive emails with PDF attachments if I use "DefaultMailSystem". I need HTML emails and "MimeMailSystem" doesn't seem to work, but that's a separate investigation – user2265915 Oct 6 '17 at 10:42
  • I recommend updating your question (if you can) with the details you've uncovered. – tenken Oct 6 '17 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.