Server Setup: How to get emails working
<p>I have a VPS which is running on Ubuntu 14.04. 
Apache, MySQL and PHP are installed and working fine.</p>

<p>The server is used to host a website, which has a contact form. 
The contact form is getting some variables from the users such as their email, subject and body (using POST).
This message is then processed using PHP's standard mail() function.</p>

<p>Well, this was working fine on my old hosting provider, but not anymore in this "self-made" server. </p>

<p>I tried configuring Sendmail and adding its path to php.ini, whithout any success.
I've also tried using the library PHPMailer hoping to use an external SMTP server without having to configure a local one. 
This works fine (PHPMailer is actually great), as long as the sender is the same identity as the user authenticated to the SMTP server... which is never going to happen with such a form where the sender is always someone different.</p>

<p>Something apparently easy is becoming a headache now.
The question is... how do I get the form to work, without having to setup any local mail server and without having the limitation to send emails just from one specific email address?</p>

<p>Thanks a lot in advance!</p>