Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.43k stars 2.78k forks source link

v17.0.2 sending emails with PHP mail fails with php8, and works fine with php7.4 #25101

Open edupulpillo opened 1 year ago

edupulpillo commented 1 year ago

Bug

Sending emails with PHP mail fails with php8, and works fine with php7.4

Environment Version

v17.0.2

Environment OS

Linux

Environment Web server

Apache2

Environment PHP

PHP8.x

Environment Database

MySQL or MariaDB 10.3.31-MariaDB

Environment URL(s)

https://mydomain.com/compta/facture/card.php?facid=128&action=presend&mode=init#formmailbeforetitle

Expected and actual behavior

In the customer invoice card, using "send email" with PHP8.x activated in the web server always fails. Switching in the server to PHP7.4, the problem dissapears.

image

Steps to reproduce the behavior

No response

Attached files

No response

frederic34 commented 1 year ago

what is the method of sending mail ? which version of PHP 8 ? 8.0, 8.1 or 8.2

edupulpillo commented 1 year ago

i have tested it with PHP8.0 and also PHP8.1 with the same results: it fails in both versions (I did not test it with PHP8.2 yet) The Email sending method that is selected in Setup/Outgoing emails/Email sending method, as i mentioned before, is PHP mail function. Can you reproduce the problem?

JESSTOFUNK commented 8 months ago

Hello, I am working with PHP8.2, I have noticed since upgrade to PHP 8 also having issues, all mails appear as sent in green but they do not arrive to destination, does not matter wich mail platform you are using and what kind of mail you send, also automatic agenda reminders with CRON are not working now, they where working before. I cannot roll back to PHP 7 since it is sensitive to atacks and they are modifing htaccess file leaving inoperative the Dolibarr with PHP 7. sent

JESSTOFUNK commented 8 months ago

I have just made a PHP rollback with backup of my apliance.

PHP 7.4 does work for PHP Mail function, the emails arrive correctly to destination. After changing again to PHP 8.2, they do not arrive, the message appears to be sended correct but they do not reach destination.