I configured LAMP server in VPS server, I tried to run PHP mail function in web browser, but it was not working in the 1st attempt. Later, I solved the issue.
1. Login to WHM with username and password.
2. Go to Server Configuration => Tweake Setting.
3. In side the Tweake Settings go to Mail option, change the 'Prevent “nobody” from sending mail' to Off Default Mode.
4. Create the PHP mail function script in the Document root "test.php".
$to = "Destination mail ID";
$message = "Hello World";
$subject = "User Activated";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers = 'Content-type: test/html; charset=iso-8859-1' . "\r\n";
$headers = 'From: Easyship <email@example.com>' . "\r\n";
mail($to, $subject, $message, $header);
dir ("Reach Here");
5. Go to web browser and test the PHP mail function script in browser.
URL:- http://IP Address/~easy/easyshipping/test.php or DomainName/test.php
6. If there is no error, go to the mail box and check for php test mail.