Quantcast
Channel: EasyEngine Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 12639

PHPMailer error on new user creation with WP Multi-Network - solution anyone?

$
0
0

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 www.networksite.co.uk 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 www.networksite.co.uk or 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 www.networksite.co.uk www.mysite.co.uk;

then the email gets sent. However, the sender is always wordpress@www.networksite.co.uk, even if I add the user when I'm logged in to www.mysite.co.uk

Has anyone else had this problem, or even if not, can you offer a solution?

Thanks,
Jason


Viewing all articles
Browse latest Browse all 12639

Trending Articles