Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#52979 closed enhancement (duplicate)

Custom names for attachment files over wp_mail function

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

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
5 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed
  • Type feature requestenhancement
  • Version 5.7

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.