Call to undefined method MailEntity.php error on sending mail

Created on 27 March 2023, over 1 year ago
Updated 29 March 2023, over 1 year ago

Problem/Motivation

I have a local setup of simple news that works perfect. But when I move simple news to my production server I get a PHP Mail error when cron runs to send mail or when sending test email.

The error

Error: Call to undefined method Drupal\Component\Utility\Unicode::mimeHeaderEncode() in Drupal\simplenews\Mail\MailEntity->getFromFormatted() (line 172 of /public_html/modules/contrib/simplenews/src/Mail/MailEntity.php).

Steps to reproduce

On my local machine where simple news mail sending works the PHP version is PHP 8.1.0
On production site that gives error the php version is PHP 8.1.6

Or is my production server configured wrong?

I am using drupal/simplenews dev-3.x (4557ac5) but dev-3.x (7c2042a) is available for upgrade.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΏπŸ‡¦South Africa vlooi vlerke

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024