Problem with hotmail
-
Hello friends,
I have a pretty big problem. It turns out that I have BuddyPress installed on my website a news magazine. The problem is that when someone registers as a new user if their email is hotmail the confirmation message does not arrive, but it does not even reach the spam tray, it does not arrive. I’ve tried with Gmail and it’s going well.
For this reason I requested help to support from my hosting provider. They told me that the problem was in one of the mail headers that BuddyPress sends to activate the account and it is this:
List-Unsubscribe: <>
The mail includes this header that is correct, what is not good is that within <> there is nothing, there should be an email or a link to unsubscribe. As they tell me in support it is very likely that this incomplete header is causing Hotmail to completely discard this email.
Can you help me solve this problem? There are many users who use Hotmail, so the problem is quite serious.
Thank you very much and best regards
-
Outllook.com are blocking the emails because of this:
if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== site_url( 'wp-login.php' ) ) { $user = get_user_by( 'email', $tokens['recipient.email'] ); $headers['List-Unsubscribe'] = sprintf( '<%s>', esc_url_raw( bp_email_get_unsubscribe_link( array( 'user_id' => $user->ID, 'notification_type' => $email->get( 'type' ), ) ) ) ); }
If yoy remove this if statement activation mails are sent. This code is located at buddypress/bp-core/bp-core.filters
It’s a new commit, that’s why it worked in previous versions.
To sum up, if you are using BuddyPress 2.9.3, users with Microsoft accounts will not receive the activation email.
Hello,
Thank you very much for your response, I have deleted that code as you said and then I have sent the activation email to a hotmail account, but the result remains the same, the mail does not arrive.
I have WP Mail SMTP installed, the email is authenticated.
regards
Wow!
Now just arrived, thank you very much, it has taken a little longer to arrive, I was doing tests with other accounts and it has taken a few minutes but it has arrived.
Do you think that when they update the plugin, they will correct this problem or will I have to be deleting this code every time there is an update?
regards
Now the emails arrive, but when you click on the link, the accounts are not activated.
What can happen?
regards
Yeah, the header was the issue. The BuddyPress team will fix it, I’m pretty sure 😉
Regarding the activation link, I will take a look, it should work since we just commented out the code where the header was added…
I put it back as I was and I clicked on the link and the accounts are not activated either.
What did I do?
Sorry I think I know what happened, when I created the new account I used Chrome, but to activate it by default I have Firefox configured, it turns out that in Firefox I had another user account started at that moment and I guess that was the one reason, anyway I have done a test from scratch, I have registered and I am waiting to receive the mail to activate it, now I tell you the result.
Thank you very much for your help
It works now for me.
I have just registered a Hotmail account and a Gmail account. Both works.
There some things you can try:
– Go to dashboard -> settings -> buddypress -> pages and change the activation page associated to buddypress, now it’s “Activar” (I think you are Spanish, I’m from Málaga), You can create another page called “Nuevo usuario” and then associate this new page to BuddyPress.
– Restore the emails (Dashboard -> tools -> BuddyPress)
It should work now for you too once you are not adding the Unsubscribe header anymore.
You are indeed a phenomenon, it has arrived and I have activated the account.
Thank you!!
Thank you @doshermanastuciudadhoy. Glad to hear it’s finally solved 🙂
Hola, tengo el mismo el problema que @doshermanastuciudadhoy no llega el email de confirmación a los dominios hotmail…
Al eliminar el código del archivo bp-core.filters.php la web peta, tambien es cierto que yo tengo la versión 3.2.0… este es el código:// Add 'List-Unsubscribe' header if applicable. if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== wp_login_url() ) { $user = get_user_by( 'email', $tokens['recipient.email'] ); $link = bp_email_get_unsubscribe_link( array( 'user_id' => $user->ID, 'notification_type' => $email->get( 'type' ), ) ); if ( ! empty( $link ) ) { $headers['List-Unsubscribe'] = sprintf( '<%s>', esc_url_raw( $link ) ); } } return $headers; } add_filter( 'bp_email_get_headers', 'bp_email_set_default_headers', 6, 4 );
Podrías ayudarme?
- You must be logged in to reply to this topic.