Magento Cloud – sendmail: /etc/msmtprc: line 6: command host needs an argument

Magento2 Teaser

This morning I ran a deployment on a fresh Magento Cloud environment and suddenly got the below SMTP error right after setup:upgrade, which was very unusual.

I had a look at the recent changes and found a mail() function in the modules InstallSchema.php script.

In this particular case, a 3rd party module developer has implemented a tracking system to notify his agency about new module installations. It may work on some hosting platforms, but obviously not on Magento Cloud during the build process.