WordPress.org

Make WordPress Core

Opened 6 weeks ago

Closed 6 weeks ago

#52979 closed enhancement (duplicate)

Custom names for attachment files over wp_mail function

Reported by: martin.kovac Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Mail Keywords:
Focuses: Cc:

Description

Hello,

currently wp_mail function doesn't support to send attachments with custom names. It has using PHPMailer and this code

<?php
$phpmailer->addAttachment( $attachment )

PHPMailer addAttachment function support to send attachment with custom name as second paramater.

<?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.

Change History (1)

#1 @ocean90
6 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Type changed from feature request to enhancement
  • Version 5.7 deleted

Hello @martinkovac, welcome to WordPress Trac!

Thanks for the ticket. We're already tracking the request in #28407 therefore I'm going to close the ticket as a duplicate.

Note: See TracTickets for help on using tickets.