After updating to version 2.3.8, I get server errors about sending emails.

Also, I get the same error if I try to manually send a password reset email to a user.

What is the cause and how do I solve it?
I use these versions:
PHP version 8.4.17
MySQL version 10.11.14 (10.11.14-MariaDB-log)
- Call to undefined method Symfony\Component\Mime\Message::getTo()
- src/XF/Mail/Mailer.php:483

Also, I get the same error if I try to manually send a password reset email to a user.

What is the cause and how do I solve it?
I use these versions:
PHP version 8.4.17
MySQL version 10.11.14 (10.11.14-MariaDB-log)