You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Digging deeper it is a change in polyfill-mbstring dependency:
```public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
{
trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING);
}```
Possible Fix
As suggested, use iconv_mime_encode. I have a working local solution for this which fix this issue.
public function translateCharsetMIME($string, $fromCharset, $toCharset = 'UTF-8', $encoding = "Q")
{
$preferences = array(
'input-charset' => $fromCharset,
'output-charset' => $toCharset,
'line-length' => 76,
'scheme' => $encoding,
'line-break-chars' => "\n"
);
$result = iconv_mime_encode('', $string, $preferences);
return substr($result, 2);
}
```
I will create a PR for this.
### Steps to Reproduce the Issue
```bash
1. Set up an new suitecrm environment (tested on 8.7 and php 8.2)
2. Login and go to admin page
3. Configure email and try to send a test email
...
Context
I tried the email functionality. I have not found any other topic to this certain issue, so I took a look at the code.
Version
8.7.0
What browser are you currently using?
Chrome
Browser Version
No response
Environment Information
PHP 8.2
Operating System and Version
Ubuntu 20.04.6 LTS
The text was updated successfully, but these errors were encountered:
Issue
There is a failing code in the legacy Localization.php in translateCharsetMIME function causing error on email sending.
The failing code is here:
Digging deeper it is a change in polyfill-mbstring dependency:
Possible Fix
As suggested, use
iconv_mime_encode
. I have a working local solution for this which fix this issue.Context
I tried the email functionality. I have not found any other topic to this certain issue, so I took a look at the code.
Version
8.7.0
What browser are you currently using?
Chrome
Browser Version
No response
Environment Information
PHP 8.2
Operating System and Version
Ubuntu 20.04.6 LTS
The text was updated successfully, but these errors were encountered: