PHPMailer error on new user creation with WP Multi-Network – solution anyone?
-
Hi everyone,
I hope someone can help…
I’m using EE WordPress (4.6.1) Multisite Subdomain with the WP Multi-Network plugin.
Everything works as expected, except when I create a new user, the new user email doesn’t get sent and the server sends a 500 error.
Going back to the users list, it turns out the user was actually created, but the error log shows:
____
2016/11/15 16:40:51 [error] 22467#22467: *242 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught exception ‘phpmailerException’ with message ‘Invalid address: wordpress@_’ in /var/www/mysite.co.uk/htdocs/wp-includes/class-phpmailer.php:946
Stack trace:
#0 /var/www/mysite.co.uk/htdocs/wp-includes/pluggable.php(352): PHPMailer->setFrom(‘wordpress@_’, ‘WordPress’, false)
#1 /var/www/mysite.co.uk/htdocs/wp-includes/ms-functions.php(1243): wp_mail(‘jason.levy@lond…’, ‘New User Regist…’, ‘New User: prunk…’)
#2 [internal function]: newuser_notify_siteadmin(18)
#3 /var/www/mysite.co.uk/htdocs/wp-includes/plugin.php(524): call_user_func_array(‘newuser_notify_…’, Array)
#4 /var/www/mysite.co.uk/htdocs/wp-includes/ms-functions.php(1067): do_action(‘wpmu_new_user’, 18)
#5 /var/www/mysite.co.uk/htdocs/wp-admin/network/user-new.php(49): wpmu_create_user(‘prunking’, ‘GX8U0mkl6BsW’, ‘first.health.lt…’)
#6 {main}
thrown in /var/www/mysite.co.uk/htdo” while reading response header from upstream, client: 141.101.99.9, server: _, request: “POST /wp-admin/network/user-new.php?action=add-user HTTP/1.1”, upstream: “fastcgi://unix:/run/php5-fpm.sock:”, host: “www.networksite.co.uk”, referrer: “https://www.networksite.co.uk/wp-admin/network/user-new.php”
____My sites-available/mysite.co.uk looks like:
____
listen 80 default_server;
listen 443 ssl http2 default_server;#server_name https://www.networksite.co.uk https://www.mysite.co.uk;
# Uncomment the following line for domain mapping
server_name _;# Uncomment the following line for domain mapping
server_name_in_redirect off;
____Whether I request https://www.networksite.co.uk or https://www.mysite.co.uk, WP Multi-Network serves the correct domain, so nginx must be sending the domain name to WordPress.
If I comment out
server_name _;
and switch back to
server_name https://www.networksite.co.uk https://www.mysite.co.uk;then the email gets sent. However, the sender is always [email protected], even if I add the user when I’m logged in to https://www.mysite.co.uk
What I don’t get is why pluggable.php is setting the mail from as “wordpress@_” when Network Admin Email is defined in the MP Multi-Network network settings. In fact in https://www.networksite.co.uk/wp-admin/network/settings.php it says “This email address will receive notifications. Registration and support emails will also come from this address.”
Has anyone else had this problem, or even if not, can you offer a solution?
Thanks,
Jason
- The topic ‘PHPMailer error on new user creation with WP Multi-Network – solution anyone?’ is closed to new replies.