If the value of the name field is not valid, then store an error message: The easiest and safest way to check whether an email address is well- formed is to use PHP' s filter_ var( ) function. The default error handling in PHP is very simple. An error message with filename,. Specifies the error message for the user- defined error: error_ file: Optional. PHP mail stopped working. How to get useful error messages in PHP? PHPMailer wont Work 000webhost. Hot Network Questions. with mysqli need add database name too