Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
WordPress 4.6 - Fatal Error: Uncaught phpmailerException #123
The latest version of Wordpress (4.6) and Valet causes a fatal error on step 2 of installing wordpress. The error is "Fatal error: Uncaught phpmailerException: Invalid address: wordpress@....".
This error occurs because WP expects the $_SERVER['SERVER_NAME'] to be set in order to create the $from_email variable. See wp-includes/pluggable.php ~line 326.
By default, Valet does not set the $_SERVER['SERVER_NAME']. Run phpinfo() and you will see no value.
To fix this issue:
In ~/.composer/vendor/laravel/valet/clu/drivers/WordPressValetDriver.php, within the frontControllerPath, add the following:
That's assuming you are using the
This fixed my problem. Here is the function, including the new line.