Hi,
This issue is reported quite often here, but I and no one else on the Matomo team can reproduce it.
My current theory on why this happens is the following:
When you click on send on the website the PHP code will get executed by php-fpm which will read e.g. /etc/php/7.3/fpm/php.ini. But the automated mail is sent by the cronjob, which executes php-cli which reads another php.ini. And I think that on your server sending mail is set up correctly for the former, but broken for the latter.