On my VPS I use Ubuntu 16.04.2, Apache2 and PHP 7.0.15. Back when I installed the server environment I executed:
php-zip php-curl php-xml php-gd php7.0-mcrypt php7.0-mbstring -y apt-get install lamp-server^ -y
All of my sites on the server are Wordpress based and use the module Contact Form 7 and from some reason all contact forms in all these sites, don't work.
Whenever I go to try to send mail to throguh the forms, I get an "An error occurred".
So far, I understand this happens due to the PHP mail() function, malfunctioning in the server.
How could I make sure it's the mail() function and bring it back to life?