Introduction
When sending mail via the PHP mail function (such as using a contact form, etc...), it tries to use the hostname to send mail and fails. For example, cpanelusernamehere@myserver.hostname.here
There are a few ways to handle this.
Procedure
The best way to get around this issue is to use a script that uses authenticated SMTP for sending mail via PHP. If you do it this way, the authenticated email account will be used to send the email. There would not be a cPanel-side way to force this to occur. Speaking with a web developer or sysadmin regarding this would be advised.
Second, you can use the fifth parameter of the PHP mail() function. To do this, you would set the following flag.
-f user@domain.tld
It is possible to hard code this into a PHP file that has the mail() routine within it.
Both of these methods would not have a cPanel-side way to implement the changes. For more help, the following forum discussions may be useful.
How to prevent all cPanel PHP mail() to be sent from server hostname?
how to change default sender address while using mail() function in PHP ?