private function buildHeaderProperties(PhabricatorMetaMTAMail $mail)
 {
     $viewer = $this->getViewer();
     $properties = id(new PHUIPropertyListView())->setUser($viewer)->setStacked(true);
     $headers = $mail->getDeliveredHeaders();
     if ($headers === null) {
         $headers = $mail->generateHeaders();
     }
     // Sort headers by name.
     $headers = isort($headers, 0);
     foreach ($headers as $header) {
         list($key, $value) = $header;
         $properties->addProperty($key, $value);
     }
     return $properties;
 }