To use a PHP form-mailer on a Linux Dedicated or Virtual Private Server (VPS), create a Web form in HTML that links to a PHP file and upload it to your server. An example script is seen below.
For more information on configuring mail servers see What are the relay mail server settings on my dedicated server?.