Notice when running cron mautic:emails:send

Your software
My Mautic version is: 4.4.7
My PHP version is: 7.4.33
My Database type and version is: 8.0.31-23

Your problem
My problem is:

I am getting this warning when the cron is run mautic:emails:send.

Why could it be?

Thank you

These errors are showing in the log:

Warning: rename(): supplied resource is not a valid Stream-Context resource in /var/www/html/app/bundles/EmailBundle/Command/ProcessEmailQueueCommand.php on line 141

And I also get this one

In AmazonApiTransport.php line 227:
Argument 1 passed to Mautic\EmailBundle\Swiftmailer\Transport\AmazonApiTransport::send() must be an instance of Swift_Mime_SimpleMessage, bool given, called in /var/www/html/vendor/swiftmailer/swiftmailer/
lib/classes/Swift/FileSpool.php on line 169

Steps I have tried to fix the problem: