[wp-trac] [WordPress Trac] #28407: You are unable to override the attachment name in wp_mail() when adding attachments
WordPress Trac
noreply at wordpress.org
Thu Jan 5 10:47:21 UTC 2023
#28407: You are unable to override the attachment name in wp_mail() when adding
attachments
-------------------------------------------------+-------------------------
Reporter: syntaxart | Owner:
| johnjamesjacoby
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.2
Component: Mail | Version: 3.9.1
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests needs- | Focuses:
testing needs-refresh |
-------------------------------------------------+-------------------------
Changes (by johnjamesjacoby):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"55030" 55030]:
{{{
#!CommitTicketReference repository="" revision="55030"
Mail: allow custom attachment filenames in `wp_mail()`.
Previous to this change, attachment filenames in outgoing emails could
only ever be derived from their paths (passed in as a numerically indexed
array of `$attachments`).
This changeset adds support for passing an associative `$attachments`
array, where the key strings will be used as filenames instead.
Includes 2 new unit tests to ensure both array formats continue to work as
intended.
Props johnjamesjacoby, ritteshpatel, swissspidy, syntaxart.
Fixes #28407.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28407#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list