Bloke / ext_file_attach

Add file upload ability to com_connect
GNU General Public License v2.0
3 stars 5 forks source link

PHP 8 email arrives as multipart content #3

Open kinoushe opened 3 years ago

kinoushe commented 3 years ago

Just a heads-up regarding PHP 8 compatibility.

Just testing a website with Textpattern 4.8.4 and PHP 8 and found that when using ext_file_attach emails now arrive as multipart content instead of plaintext with attachment. Reverting to PHP 7.4 resolves this.

What I'm seeing in Apple Mail with PHP 8:

--f2b57013356e3f84c2c6b1d9b77f95d2
Content-Type: multipart/alternative; boundary=6e6eea184f91b7376190beed7e793286
--6e6eea184f91b7376190beed7e793286
Content-Type: text/plain; charset=utf-8

Name: Test Name

Email: test@email.com

Message: Test upload PHP 8
--6e6eea184f91b7376190beed7e793286--
--f2b57013356e3f84c2c6b1d9b77f95d2
Content-Type:image/png; name="test.png"
Content-Transfer-Encoding:base64
Content-Disposition:attachment; filename="test.png"
X-Attachment-Id:5106

...

--f2b57013356e3f84c2c6b1d9b77f95d2--
Bloke commented 3 years ago

Interesting. I'll see if I can set up a PHP 8 environment and test this.

Thanks for the report.