Class "Drupal\Component\Utility\Mail" not found

Created on 5 April 2023, almost 2 years ago

Problem/Motivation

Cron logs show that the email failed to send.

Error: Class "Drupal\Component\Utility\Mail" not found in commerce_abandoned_carts_cron() (line 108 of /app/web/modules/contrib/commerce_abandoned_carts/commerce_abandoned_carts.module).

Looks like this was deprecated in 9.2 and removed in 10. https://www.drupal.org/node/3207439

Steps to reproduce

This is on 10.7 and PHP 8.1. Test mode is enabled. I triggered cron job and checked cron logs. Note: error doesn't show in my normal error logs.

Proposed resolution

Patched to fix according to suggestions in ttps://www.drupal.org/node/3207439. Because this was supposed to be just working on the the "from name" not the whole address, i went with the unstructured header. I'm not sure i chose correctly. Open to correction.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024