How do I enable PHPMail()
We disable PHPMail() function on all Linux VMs, this is often something that is abused and can allow spam to be sent from your virtual machine. PHPMail function is quite old and we highly recommend not using it, and to use SMTP with SMTP Authentication with your scripts. CMS's like Wordpress have plugins to enable SMTP mail.
However, if you really wish to make your server vulnerable and enable phpmail() please do the following
1) Connect to the server via SSH
2) type: nano /usr/lib/php.ini
3) use Control+W (command+W on a mac) to locate search box.
4) search for sendmail. You will find a line with ;sendmail_path = "/usr/sbin/sendmail -t -i" just remove the ; from the beggining
5) Press Control+X (command+X on a mac) to exit the App, then press Y to confirm you wish to save changes
6) Restart apache by typing service httpd restart
this will then re-enable phpmail. Simply revert this to again disable phpmail.