docs: def _process_attachments(self, email):
          """
          Convert the attachments in the email to the appropriate format for
          sending with Connection.send().
          """
          for a in email.attachments:
              if isinstance(a, MIMEBase):
                  if not a.is_multipart():
                      obj = {
                          'filename': a.get_filename(),
                          'content_type': a.get_content_type(),
                      }
                      if a.get('content-transfer-encoding') == 'base64':
                          obj['content'] = a.get_payload()
                          obj['encoded'] = True
                      else:
                          obj['content'] = a.get_payload(decode=True)
                      yield obj
              else:
                  yield {
                      'filename': a[0],
                      'content_type': a[2],
                      'content': a[1],
                  }