Opened 11 years ago
Last modified 6 years ago
#27239 new defect (bug)
Registration email not sent (multisite subdirectory)
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8.1 |
Component: | Users | Keywords: | |
Focuses: | multisite | Cc: |
Description
I am trying to add new user:
- wp-admin/user-new.php
When I add new user from site administration, there is no notification email sent to activate account.
- wp-admin/network/user-new.php
When I add new user from network administration, information email is sent. But then I have to add this user to specific site and there is another notification email sent. Everything works well.
Change History (11)
#1
@
11 years ago
- Component changed from Networks and Sites to Users
- Keywords reporter-feedback added
#2
follow-up:
↓ 3
@
11 years ago
Thank you, but my problem is scenario number 4.
There is activation email:
https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-admin/user-new.php#L19
And it should be sent probably here:
https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-includes/ms-functions.php#L873
I tried Email Log plugin and wp_mail() call is logged, but no email never received.
I tried also scenario number 1 and it works well, there are two emails (registration and notification).
#3
in reply to:
↑ 2
@
11 years ago
Replying to pavelevap:
Thank you, but my problem is scenario number 4.
I tried Email Log plugin and wp_mail() call is logged, but no email never received.
No email is received for scenario 4, but the wp_mail()
call occurs? Can you duplicate this behavior without any plugins installed?
#4
@
11 years ago
Yes, I deactivated plugin for domain mapping, removed SUNRISE and activated Twenty Fourteen (it is fresh 3.8.1 installation).
https://core.trac.wordpress.org/ticket/27239#comment:3
When I add new user from wp-admin/user-new.php, following mesagge is displayed:
"Invitation email sent to new user. A confirmation link must be clicked before their account is created."
And Email log plugin shows that email was processed - probably hooking into wp_mail():
[Something Sites] Activate test1 Hi, You've been invited to join 'Something' at http://something.cz with the role of Administrator. If you do not want to join this site please ignore this email. This invitation will expire in a few days. Please click the following link to activate your user account: http://something.cz/wp-activate.php?key=5611ee130394a5ec
But no email never received. There is no notification and no activation email.
Scenario number 1 works well for me.
#5
@
11 years ago
Can you check your server's email log to see if a mail is actually being sent?
Are all other emails from your server being sent?
#6
@
11 years ago
I will try to ask my webhoster, but I am not sure about that, because it is standard shared program and I have no direct access to server.
Yes, all other emails work well (I tried to insert comment and notification received, also scenario number 1 works well), so I guess it is not related to any server email issue...
#7
@
11 years ago
Scenario 1: There are 3 emails:
a) From wordpress@domain to Registered user (Username and password).
b) From wordpress@domain to Administrator (Registration notification contains username, IP and link to cancel notification: wp-admin/network/settings.php).
c) From wordpress@domain to Administrator (Another registration notification contains username and email).
Scenario 4: There is only one email:
a) From Administrator to Registered user (Activation notification).
My problem was related to my hoster restriction ("Sender domain not allowed - only from hosted domains"). And my administration email was set to gmail.com and in scenario 4 it was used for "From" field. I am not sure why? So email was processed, but blocked by ISP. You can probably close this ticket or maybe "From" field should be changed also to wordpress@domain?
#8
@
11 years ago
- Keywords reporter-feedback removed
Ok, that makes sense. It looks like this has been in place since the MU merge. The same notification is triggered when registering a new blog as well.
$admin_email = get_site_option( 'admin_email' ); if ( $admin_email == '' ) $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
This is probably how notifications should happen in multisite. At the network level, the administrator is acting as a global administrator. At the same time, each individual site is then able to have their own mail identity. Ideally, the server is configured to handle both scenarios (mail delivery being a finicky thing).
It may be worth putting some kind of filter in to make it easier to override. It may also be worth rethinking how various bits of registration and notification happen. The filters in wp_mail()
can probably help in the near term.
Thanks for the report, @pavelevap.
I just ran through the scenarios I could think of:
wp-admin/network/user-new.php
, notification email sent.wp-admin/network/site-users.php
, notification email sent.wp-admin/network/site-users.php
, no notification email sent.wp-admin/user-new.php
, activation/notification email sent.wp-admin/user-new.php
, activation email sent.Is #3 the issue that you're running into?
We should probably duplicate single site behavior here and have a checkbox to skip sending a confirmation email.