WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#31775 new enhancement

wp_mail attachments support only ascii symbols

Reported by: Fike Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.1.1
Component: Mail Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Hi. Currently wp_mail() passes it's attachments directly to PHPMailer, and that results in taking file basename as attachment name. Basename seems to behave not normal on non-ascii symbols, for example /сontacts.png (the first 'c' is russian) will be truncated as ontacts.png. Apart from that, even if it would be basename'd correctly, it won't be utf8-encoded as required by standard (=?utf-8?B?base64?=), and that will probably result in broken mails and/or rejected mails.

So i'm proposing to implement functionality for manual attachment naming and/or automatic basenaming filenames and encoding attachment names according to standard.

#28407 is tightly bound to this request.

Change History (2)

#1 @SergeyBiryukov
3 years ago

  • Description modified (diff)

#2 @cbutlerjr
2 years ago

Would resolving #28407 resolve this?

Note: See TracTickets for help on using tickets.