I do not need to do this anymore.It is already running.I just downgraded to PHP 5.5 and made these modifications in my WHM / cPanel:The cpanel server was configured only for root user and on the other user. Hence whenever the email was being sent via PHP, smtp would redirect to the local server.To verify and rectify the issue please follow:"SMTP to root, exim, and mailman (FKA SMTP Tweak)" under WHM> Server Configuration> Tweak Settings> Mail. Enabling this feature will redirect outgoing SMTP connections to the local mail server. Root, exim, and mailman are still allowed to make direct connections.