7.x Contrib phpunit tests fail - WD mail: Error sending e-mail from admin@example.com

Migrated issue

Reported by: jonathan1055

Related to !96 (closed) !94 (merged)

Problem/Motivation

Since a few days ago, my D7 contrib phpunit tests have all started to fail with

# Install Drupal. # collapsed multi-line command
You are about to create a /builds/project/scheduler/web/sites/default/settings.php file and DROP all tables in your 'mysql' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the [ok]
--notify global option.
sh: 1: /usr/sbin/sendmail: not found
WD mail: Error sending e-mail (from admin@example.com to             [error]
admin@example.com).

Example log is https://git.drupalcode.org/project/scheduler/-/jobs/480276#L290

Related issue: Issue #3408757

Edited by drupalbot