WordPress HTTP Error 500 via password recovery

August 22, 2016 4.2k views
WordPress Nginx LEMP Ubuntu 16.04

I was following this guide and when I click on 'Forgot password' and enter my email for a recovery link, it brings me to a page that says,
The MYSITE.com page isn’t working
MYSITE.com is currently unable to handle this request.

Here is my nginx/error.log
I have sendmail installed with default configuration.

2016/08/21 20:16:01 [error] 2490#2490: *422 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught phpmailerException: Invalid address: wordpress@ in /var/www/MYSITE.com/html/wp-includes/class-phpmailer.php:946
Stack trace:
#0 /var/www/MYSITE.com/html/wp-includes/pluggable.php(352): PHPMailer->setFrom('wordpress@', 'WordPress')
#1 /var/www/MYSITE.com/html/wp-login.php(380): wp_mail('MYEMAIL@gmail.c...', '[MYSITE] P...', 'Someone has req...')
#2 /var/www/MYSITE.com/html/wp-login.php(503): retrieve_password()
#3 {main}
  thrown in /var/www/MYSITE.com/html/wp-includes/class-phpmailer.php on line 946" while reading response header from upstream, client: xx.xxx.xxx.xxx, server: , request: "POST /wp-login.php?action=lostpassword HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "MYSITE.com", referrer: "https://MYSITE.com/wp-login.php?action=lostpassword"
1 comment
1 Answer

I am having the same issue, did you find an answer ?

  • Yes. If you are able to login with the initial credentials, you have to take the next steps to setup communications with a mail server. If you cannot login, delete the mysql database associated with the WP website and start again.

    by Mitchell Anicas
    One way to send and receive email through your own custom domain is to use a third-party mail service, such as Zoho or Google Apps. The main benefit of using a third-party mail service, as opposed to managing your own mail server, is that you can avoid performing the ongoing maintenance that running a mail server entails. This tutorial will show you how to set up Zoho Mail with your custom domain that is managed by DigitalOcean's Domain Name Servers.
Have another answer? Share your knowledge.