code: protected function buildSenderField($identity)
      {
          if (null === $identity) {
              return [];
          }
  
          if (is_string($identity)) {
              return [
                  'Email' => $identity,
              ];
          }
  
          $sender = [
              'Email' => $identity->getEmail(),
          ];
  
          if (null !== $name = $identity->getName()) {
              $sender['Name'] = $name;
          }
  
          return $sender;
      }
docs: @param IdentityInterface|string $identity
  
  @return array