Skip to:
Content

BuddyPress.org

Opened 20 months ago

Closed 20 months ago

Last modified 19 months ago

#7697 closed defect (bug) (fixed)

Outlook.com rejects emails from BuddyPress.

Reported by: jcrr Owned by: DJPaul
Milestone: 2.9.4 Priority: high
Severity: normal Version: 2.8.0
Component: Emails Keywords: has-patch
Cc:

Description

This is a follow-up to #7390.

By request I'm opening this issue. Please, read the retated one (#7390).

Outlook.com users will not receive the BuddyPress emails because of the List-Unsubscribe header.

This issue is resolved by commenting out the lines that add this header as I mentioned in the forums:

// Add 'List-Unsubscribe' header if applicable. 
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' ), 
 		                ) ) ) 
    ); 
}
 

Attachments (1)

7697.01.patch (856 bytes) - added by r-a-y 20 months ago.

Download all attachments as: .zip

Change History (10)

#2 @r-a-y
20 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.0
  • Priority changed from normal to high
  • Version set to 2.8.0

Confirmed.

The problem is right now the List-Unsubscribe email header gets added to any BP email even if that email does not support an unsubscribe link. When this occurs (as is the case with activation emails), the email header that is added is blank -- List-Unsubscribe: <>.

I'm guessing Outlook.com is very particular about the List-Unsubscribe header needing to be complete. If it is not complete, then the email doesn't get received.

01.patch fixes this by ensuring that we do not add the List-Unsubscribe header if we do not have a valid unsubscribe link.

I tested this with an Outlook email address and I'm now able to receive the activation email.

@jcrr - Could you test the patch to verify?

Last edited 20 months ago by r-a-y (previous) (diff)

@r-a-y
20 months ago

#3 @jcrr
20 months ago

Tested and working for me too.

Yeah, Microsoft needs a valid unsubscribe link and this patch solve this issue by adding the header only if the unsubscribe link is not empty.

Thanks @r-a-y for changing the priority to high. This patch should be applied as soon as possible so that Outlook.com users can receive the BuddyPress emails.


#4 @r-a-y
20 months ago

  • Milestone changed from 3.0 to 2.9.3

Moving to 2.9.3 milestone.

#5 @r-a-y
20 months ago

In 11862:

Emails: Only add the 'List-Unsubscribe' header if we have a valid unsubscribe link.

Previously, we were adding a blank 'List-Unsubscribe' header for activation
and change of email address emails. This caused delivery issues for those
using Outlook.com as their email address. It appears that Outlook.com
requires a valid 'List-Unsubscribe' header in order for the email to be
received.

This commit fixes this by only adding the 'List-Unsubscribe' header if we
have a valid email unsubscribe link.

Props jcrr.

See #7697 (2.9-branch)

#6 @r-a-y
20 months ago

In 11863:

Emails: Only add the 'List-Unsubscribe' header if we have a valid unsubscribe link.

Previously, we were adding a blank 'List-Unsubscribe' header for activation
and change of email address emails. This caused delivery issues for those
using Outlook.com as their email address. It appears that Outlook.com
requires a valid 'List-Unsubscribe' header in order for the email to be
received.

This commit fixes this by only adding the 'List-Unsubscribe' header if we
have a valid email unsubscribe link.

Props jcrr.

See #7697 (trunk)

#7 @r-a-y
20 months ago

  • Resolution set to fixed
  • Status changed from new to closed

Thanks for reporting the problem and for verifying the fix, @jcrr!

We've added the fix to the upcoming v2.9.3 release, which is maybe a few weeks out from release.

Thanks again!

#8 @DJPaul
20 months ago

👏🏻

#9 @DJPaul
19 months ago

  • Milestone changed from 2.9.3 to 2.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.