code: function findAttachmentParts(struct, attachments) {
          attachments = attachments || [];
          for (let i = 0, len = struct.length, r; i < len; ++i) {
              if (Array.isArray(struct[i])) {
                  findAttachmentParts(struct[i], attachments);
              } else {
                  if (struct[i].disposition && ['INLINE', 'ATTACHMENT'].indexOf(toUpper(struct[i].disposition.type)) > -1) {
                      attachments.push(struct[i]);
                  }
              }
          }
          return attachments;
      }
docs: __DOCSPLACEHOLDER__
  
  @param {any} struct __DOCSPLACEHOLDER__
  @param {any} attachments __DOCSPLACEHOLDER__
  @return {object} attachments