示例#1
0
 /**
  * Gets the Content-Type for the given part
  *
  * @param PartInterface $part The message part
  *
  * @return ContentType|null
  */
 protected function getPartContentType(PartInterface $part)
 {
     return $part->getHeaders()->has('Content-Type') ? $part->getHeader('Content-Type') : null;
 }
示例#2
0
 /**
  * @param PartInterface $part
  *
  * @return bool
  */
 protected function isBase64Encoded(PartInterface $part)
 {
     return $part->getHeaders()->has('Content-Transfer-Encoding') && $part->getHeaders()->get('Content-Transfer-Encoding')->getFieldValue() === 'base64';
 }