Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#28782 closed enhancement (duplicate)

Attachment file name changed

Reported by: p_j_albuquerque Owned by:
Priority: normal Milestone:
Component: Mail Version: 3.9.1
Severity: normal Keywords:
Cc: Focuses:

Description (last modified by SergeyBiryukov)

At the moment WordPress is unable to send an attached file with a default name.

wp-includes\pluggable.php

Current
Line: 483

	if ( !empty( $attachments ) ) {
		foreach ( $attachments as $attachment ) {
			try {
				$phpmailer->AddAttachment($attachment);
			} catch ( phpmailerException $e ) {
				continue;
			}
		}
	}

Change
Line: 483

	if ( !empty( $attachments ) ) {
		foreach ( $attachments as $attachment ) {
			try {
				if(is_array($attachment)){
					$phpmailer->AddAttachment($attachment[archive], $attachment[name]);
				}else{
					$phpmailer->AddAttachment($attachment);
				}
			} catch ( phpmailerException $e ) {
				continue;
			}
		}
	}

Attachments (1)

pluggable.php (70.3 KB ) - added by p_j_albuquerque 12 years ago.
Change Line: 487 to 490

Download all attachments as: .zip

Change History (2)

@p_j_albuquerque
12 years ago

Change Line: 487 to 490

#1 @SergeyBiryukov
12 years ago

  • Description modified (diff)
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Duplicate of #28407.

Note: See TracTickets for help on using tickets.