diff options
-rw-r--r-- | src/EmailMessage.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/EmailMessage.php b/src/EmailMessage.php index 1c853d7..2caccca 100644 --- a/src/EmailMessage.php +++ b/src/EmailMessage.php @@ -120,16 +120,16 @@ abstract class EmailMessage implements Message { $mimetype = $part->ctype_primary . '/' . $part->ctype_secondary; + $comment = array_key_exists('content-description', $part->headers) ? + $part->headers['content-description'] : ''; + $params = array( 'filename' => $filename, 'mimetype' => $mimetype, + 'comment' => $comment, 'data' => $part->body ); - if (array_key_exists('content-description', $part->headers)) { - $params['comment'] = $part->headers['content-description']; - } - $attachments[] = $params; } } |