I have a VPS which is running on Ubuntu 14.04. Apache, MySQL and PHP are installed and working fine.
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.
Well, this was working fine on my old hosting provider, but not anymore in this "self-made" server.
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.
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?
Thanks a lot in advance!