BuddyDev

Search

[Resolved] BuddyPress not sending email activation to hotmail

  • Keymaster
    (BuddyDev Team)
    Posts: 24300
    Brajesh Singh on #32599

    Hi Jean,
    Thank you for the question.

    You may want to take a look here for the similar issue and solution

    https://buddypress.org/support/topic/problem-with-hotmail/

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    Jean-Philippe on #32608

    Hello,
    In my case I don’t have this code :

    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' ),
    		) ) )
    	);
    }

    but, I have this one. When I’m trying to remove it, I get a bug.

    
    	// 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 );
    
  • Keymaster
    (BuddyDev Team)
    Posts: 24300
    Brajesh Singh on #32632

    Hi,
    You may want to add this in bp-custom.php

    
    
    add_filter( 'bp_email_get_headers', function ( $headers ) {
    	unset( $headers['List-Unsubscribe'] );
    
    	return $headers;
    }, 10 );
    
    

    and check if it works. It also removes the list header without modifying the code manually.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    Jean-Philippe on #32654

    Hello,

    I have used this code but nothing has changed. Hotmail doesn’t yet receive activation mail

  • Keymaster
    (BuddyDev Team)
    Posts: 24300
    Brajesh Singh on #32664

    Hi Jean,
    I am sorry but I don’t know the reason then. If someone can point the reason, I can help fix though.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    Jean-Philippe on #33158

    Hi Brajesh,

    I have done some investigations :
    1 – My webhost was facing to black listing IP concerning hotmail. That was fixed.
    2 – When my buddypress sent an activation email, the email adress was ‘wordpress@mydomain.com’. I have reconfigured my WordPress SMTP. Now it’is good.

    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24300
    Brajesh Singh on #33171

    Hi Jean,
    Thank you for sharing the update. I am glad it is resolved.

    Regards
    Brajesh

The topic ‘ [Resolved] BuddyPress not sending email activation to hotmail’ is closed to new replies.

This topic is: resolved