Hello,
I manage a site that uses several webforms integrated with civicrm. I was using php 7.4 in the server but following the notices about deprecation of this version of php I have updated to 8.1.
After this change, the emails do not attach pdfs anymore and the email body isn't formatted as html.
I used Mime Mail to format and send emails.
I have all modules and core updated, webform, civicrm, tcpdf, mimemail, etc.
The first lines of an emails shows, for example:
This is a multi-part message in MIME format. --729d7c3ed8bc0bb58126c409c240f130fb3b8c1c1 Content-Type: multipart/alternative; boundary="c911c97aed9baeb8ca3278e47d2959cf9e1fa99f0" Content-Transfer-Encoding: 8bit --c911c97aed9baeb8ca3278e47d2959cf9e1fa99f0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit
Changing to default for delivery and formatting does not resolved problem. The first lines are:
--------------adf9ba40a66c208e16502193edab401a Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: 8bit
The server has the Mail Mime pear package.
The status report show that php version is 8.1.28 and enabled packages are: date, dom, filter, gd, hash, json, pcre, pdo, session, SimpleXML, SPL, xml.
With this description, I could ask for any suggestion or advice to debug this problem and to find a solution.
Thanks!
Andrés
Comments
Andres, do you use the module mailsystem together with mimemail?
Also this may sound silly, but try fully uninstalling mimemail and reinstalling it, then checking the configurations again, and the ones in mailsystem if you use that.
Hello,
I use mailsystem. I unistalled mimemail but do not solved the problem...
Andrés
hmm.. try uninstalling and reinstalling both modules?
So, what do you use to generate the PDF (or is it an uploaded file)? And how to do you attach the PDF? Are you using hook_mail with the parameter 'attachments'? Or is this handled by a contrib module?
I'm wondering if this is an issue with the tcpdf contrib module. There was a release 2 weeks ago for 8.1 compatibility. Do you have that?
The same here after updating PHP version from 7.4 to 8.1. No HTML mail sent anymore (I am using MIME-Mail). I already tried uninstall/reinstall. The received mails start with
This is a multi-part message in MIME format.
--d7b9738ca28a1d6caa7621abb76a2f3417d71e951
Content-Type: multipart/alternative;
boundary="3a79b1cf24eed18d4328d05d0f8f504cba7dfba00"
Content-Transfer-Encoding: 8bit
--3a79b1cf24eed18d4328d05d0f8f504cba7dfba00
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Mailtext goes here...
Are you using mailsystem as well? I send lots of emails with pdf attachments using a combination of mailsystem, MIME mail and SMTP authentication in PHP 8.1 and have never experienced that issue. At times, the order in which you enable SMTP and MIME can "confuse" mailsystem - I've had to go back to mailsystem settings ui and fix that.
Also, how do you attach PDFs? I use hook_mail for this. Any module in particular?
EDIT: In my setup I use MIME mail to format and SMTP for send the email.
Yes I use mailsystem and MIME, but not SMTP and no attachements at all. Maybe this is not the right thread here;-) But the HTML mails stop working as soon as I upgrade the PHP version to 8.x
Hmmm... interesting. I've always used SMPT to send HTML emails formatted by MIME mail, so this may actually prevented the issue for me. Perhaps create an issue in MIME mail issue queue?
Hello!
Here we follow with the problem. I disabled mimemail, mail system and smtp authentication modules but the emails do not attach pdfs.
I use webform2pdf module to attach pdfs, that has no dependencies with the modules disabled.
I think that I have an issue with mimemail, regarding the formatting of html content and an issue with webform2pdf regarding the pdf attachment, but I don't know how to debug them.
Searching in the reports, I see a lot of php warnings with origin in the webform and related with the civicrm install and civicrm extensions, like that:
Notice: Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect en civimobile_civicrm_config() (línea 21 de /home16/andrcdd/public_html/files/civicrm/ext/com.webaccessglobal.module.civimobile/civimobile.php).
I don't know if them are related to the problem.
I will create an issue in webform2pdf and mimemail modules issue queue.
Thank you in advance!
Andrés
Last time I tried CiviCRM, it was incompatible with PHP 8+. You are certainly running into that.
https://forum.backdropcms.org/forum/trouble-accessing-civicrm-after-inst...