Wordpress not sending emails

I reread Lupu’s answer and realized that I missed an important tip. So I went to investigate the /etc/php/7.3/apache2/php.ini

I had:

;sendmail_path =

Meaning that the sendmail path wasn’t configured.

So I went to my old VestaCP configuration and found this:

sendmail_path = /usr/sbin/sendmail -t -i

So I added this line to my php.ini in HestiaCP.

I also installed sendmail, somehow it wasn’t installed…

Yet, sendmail replaced exim…

I tried to reinstall exim, but it seems that I have to choose between exim and sendmail.

root@vps:~# apt install exim4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  liblockfile1 lockfile-progs procmail sendmail-base sensible-mda
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  exim4-base exim4-config exim4-daemon-light libevent-2.1-6 libgnutls-dane0 libunbound8
Suggested packages:
  exim4-doc-html | exim4-doc-info eximon4 mail-reader spf-tools-perl swaks dns-root-data
Recommended packages:
  mailx
The following packages will be REMOVED:
  sendmail sendmail-bin
The following NEW packages will be installed:
  exim4 exim4-base exim4-config exim4-daemon-light libevent-2.1-6 libgnutls-dane0 libunbound8

Messing around with configs I now get 9/10 in mail-tester.com and Wordpress still doesn’t send emails…

Anyway, I forgot to mention that the old VestaCP (where Wordpress can send emails) was installed in CentOS 7, so packages are different. In CentOS it seems we can have both, sendmail and exim working.

Anyway, I’ll install a fresh new HestiaCP, it makes more sense because I installed the beta version then upgraded to stable and I don’t fully trust the stability of upgrades to beta versions.

I’ll report back if I get this working (Wordpress sending emails).