Comment on How to fix “Could not instantiate mail function”, PHPMAILER_RECIPIENTS_FAILED and PHPMAILER_FROM_FAILED on Joomla and RSforms by Speed Of Light.
I’ve had the exact same problem, and searched alot with no success.
I changed the ‘joomla/components/com_contact/controller.php’ source and hard-codded it, and finally it worked.
So, it’s not a Linux complication issue, but a Joomla bug.