Opened 10 years ago
Last modified 5 years ago
#30128 new enhancement
Allow to use associative arrays beside indexed arrays in wp_mail $headers
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 2.3 |
Component: | Keywords: | has-patch needs-codex needs-unit-tests needs-refresh | |
Focuses: | Cc: |
Description
eg:
$headers = [ 'From' => 'Me Myself <me@example.net>', 'Cc' => 'John Q Codex <jqc@wordpress.org>', ];
beside:
$headers = [ 'From: Me Myself <me@example.net>', 'Cc: John Q Codex <jqc@wordpress.org>', ];
and also (because why not):
$headers = [ 'From' => 'Me Myself <me@example.net>', 'Cc' => [ 'John Q Codex <jqc@wordpress.org>', 'iluvwp@wordpress.org', ], ];
Attachments (3)
Change History (9)
This ticket was mentioned in IRC in #wordpress-dev by marsjaninzmarsa. View the logs.
10 years ago
#5
@
10 years ago
- Keywords needs-unit-tests added
This looks like a good idea. It could use some unit tests though to be on the safe side. The current mail unit tests pass.
I've refreshed the patch above so that it applies cleanly.
#6
@
5 years ago
- Keywords needs-refresh added; needs-testing removed
- Milestone set to Future Release
Looks like 30128.2.patch needs an additional refresh on trunk
, and still needs unit tests.
Note: See
TracTickets for help on using
tickets.
It is also possible to use single line notation for multiple CC/BCC, eg: