Make WordPress Core

Opened 8 years ago

Closed 4 months ago

Last modified 4 months ago

#43206 closed defect (bug) (duplicate)

Angle brackets around URLs can confuse email clients

Reported by: tomdxw's profile tomdxw Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.2
Component: Mail Keywords:
Focuses: Cc:

Description

In #14140, angle brackets were added to plain text emails sent by WordPress due to some email clients not handling long URLs correctly.

However in some email clients, the trailing > is treated as part of the link, which also causes users to end up at the wrong URL.

As there is no standardised way to make a link clickable in a plain text document I think the best solution would be for WordPress to send all mail in both text/plain and text/html.

Change History (8)

#1 @swissspidy
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #23578.

#2 @tomdxw
8 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Sorry, this is not the same issue.

#23578 is asking for retrieve_password() to change its behaviour based on the output of the wp_mail_content_type filter. This would allow people running WordPress sites to force WordPress to send plain text emails as HTML.

This ticket is asking for retrieve_password() (and other functions that send emails with links) to send a multipart email with a text/plain part and a text/html part. This would fix a problem with email clients trying to guess where links are and failing (or at least it would fix it for people using email clients which support HTML).

#3 @SergeyBiryukov
8 years ago

Related: #18493, #21095, #23420, #39742.

The latest patch on #23578 changes wp_mail() to convert URLs in brackets to proper links if wp_mail_content_type is set to text/html, I think that would be a good first step.

Last edited 8 years ago by SergeyBiryukov (previous) (diff)

#4 @SergeyBiryukov
8 years ago

  • Milestone set to Awaiting Review

#5 @swissspidy
8 years ago

#43756 was marked as a duplicate.

#6 @SergeyBiryukov
7 years ago

#44589 was marked as a duplicate.

#7 in reply to: ↑ description @SirLouen
4 months ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

Replying to SergeyBiryukov:

Related: #18493, #21095, #23420, #39742.

The latest patch on #23578 changes wp_mail() to convert URLs in brackets to proper links if wp_mail_content_type is set to text/html, I think that would be a good first step.

This is a two folded problem:

Replying to tomdxw:

As there is no standardised way to make a link clickable in a plain text document I think the best solution would be for WordPress to send all mail in both text/plain and text/html.

On one side, user is suggesting that one solution could be functional multipart/alternative which would partly do the cut but not entirely. This is currently being covered in #15448.

However in some email clients, the trailing > is treated as part of the link, which also causes users to end up at the wrong URL.

According to RFC 2396:

In practice, URI are delimited in a variety of ways, but usually within double-quotes "http://test.com/", angle brackets <http://test.com/>, or just using whitespace

Using <> angle brackets around each URI is especially recommended as a delimiting style for URI that contain whitespace.

So the fact that some email clients are not correctly recognizing these brackets, means that they are not compliant with standards, and we cannot do benefit those clients in exchange for harming other clients that are doing things right.

In fact, this goes further: some clients like Mailpit (reported upstream) don't respect the spaces between the angle brackets, while others like Apple's Mail do.

For all these reasons, this report is a close with wontfix candidate, but given that the proposed solution with multipart has been already been covered and I also believe could be a solution, to add up to the other ticket I'm going to mark this as another duplicate for #15448

#8 @peterwilsoncc
4 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.