Changes between Version 3 and Version 4 of Ticket #28407, comment 5
- Timestamp:
- 03/26/2015 12:43:00 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28407, comment 5
v3 v4 4 4 It is not possible to upload multiple file attachment. 5 5 It would be possible to change. 6 6 {{{ 7 7 if ( !empty( $attachments ) ) { 8 foreach ( $attachments as $attachment ) { 9 try { 10 if(is_array($attachment)){ 11 list($name, $file) = each($attachment); 12 $phpmailer->AddAttachment($file, $name); 13 }else{ 14 $phpmailer->AddAttachment($attachment); 15 } 16 } catch ( phpmailerException $e ) { 17 continue; 8 foreach ( $attachments as $attachment ) { 9 try { 10 if(is_array($attachment)){ 11 list($name, $file) = each($attachment); 12 $phpmailer->AddAttachment($file, $name); 13 }else{ 14 $phpmailer->AddAttachment($attachment); 18 15 } 16 } catch ( phpmailerException $e ) { 17 continue; 19 18 } 20 19 } 21 20 } 21 }}} 22 22 23 23 24 24 Exemple: 25 25 {{{ 26 26 $attachments[] = array( 27 $_FILES[arquivo][name] => $_FILES[arquivo][tmp_name], 28 ); 27 $_FILES[arquivo][name] => $_FILES[arquivo][tmp_name], 28 ); 29 }}}