Email error with log

Cant send emails getting this error

[11-Oct-2023 22:27:05 UTC] PHP Warning: mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead in /var/www/html/vendor/symfony/polyfill-mbstring/Mbstring.php>
[11-Oct-2023 22:27:05 UTC] PHP Fatal error: Uncaught TypeError: mb_encode_mimeheader(): Return value must be of type string, null returned in /var/www/html/vendor/symfony/poly>
Stack trace:
#0 /var/www/html/public/legacy/include/Localization/Localization.php(456): mb_encode_mimeheader()
#1 /var/www/html/public/legacy/modules/Emails/Email.php(3111): Localization->translateCharsetMIME()
#2 /var/www/html/public/legacy/modules/Emails/EmailsController.php(283): Email->sendFromOutbound()
#3 /var/www/html/public/legacy/include/MVC/Controller/SugarController.php(522): EmailsController->action_send()
#4 /var/www/html/public/legacy/include/MVC/Controller/SugarController.php(491): SugarController->do_action()
#5 /var/www/html/public/legacy/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()
#6 /var/www/html/public/legacy/include/MVC/Controller/SugarController.php(361): SugarController->process()
#7 /var/www/html/public/legacy/include/MVC/SugarApplication.php(101): SugarController->execute()
#8 /var/www/html/public/legacy/index.php(52): SugarApplication->execute()
#9 {main}
thrown in /var/www/html/vendor/symfony/polyfill-mbstring/bootstrap80.php on line 21

any ideas?

Hey
check if the extension mbstring is installed on you server.
You haven’t mentioned what is your stack so I can’t help anymore.
In ubuntu you will something like

sudo apt-get install php7.2-mbstring
1 Like

Thank you that was it. I ran

apt install php8.0-mbstring and email working.

1 Like

You’ll need more modules. I just installed a SuiteCRM 8.4.1 server with PHP 8.2 and used this

sudo apt install php8.2-common php8.2-mysql php8.2-xml php8.2-xmlrpc php8.2-curl php8.2-gd php8.2-imagick php8.2-cli php8.2-dev php8.2-imap php8.2-mbstring php8.2-opcache php8.2-soap php8.2-zip php8.2-ldap php8.2-intl -y

You’ll have to adapt that to PHP 8.0, but as you can see, it’s better not to stumble on the problems of each missing add-on, one by one…

1 Like

Thanks. I’ll run this now.