[wp-trac] [WordPress Trac] #52979: Custom names for attachment files over wp_mail function
WordPress Trac
noreply at wordpress.org
Tue Apr 6 11:05:41 UTC 2021
#52979: Custom names for attachment files over wp_mail function
-----------------------------+-----------------------------
Reporter: martin.kovac | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 5.7
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Hello,
currently wp_mail function doesn't support to send attachments with custom
names. It has using PHPMailer and this code
{{{#!php
<?php
$phpmailer->addAttachment( $attachment )
}}}
PHPMailer addAttachment function support to send attachment with custom
name as second paramater.
{{{#!php
<?php
addAttachment(
$path,
$name = '',
$encoding = self::ENCODING_BASE64,
$type = '',
$disposition = 'attachment'
)
}}}
It should be fine if $attachment in wp_mail function will have this option
too.
Thanks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52979>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list