src/MailMap/MailFactory.php
protected function parseSubject($subject)
    {
        $subject = imap_mime_header_decode($subject);

        $subjectParts = array_map(function ($subj) {
            if (strtolower($subj->charset) === 'default') {
                return $subj->text;
            }
            return iconv($subj->charset, static::$charset, $subj->text);
        }, $subject);

        return implode('', $subjectParts);
    }
protected function parseSubject($subject)
    {
        $subject = imap_mime_header_decode($subject);

        $subjectParts = array_map(function ($subj) {
            if (strtolower($subj->charset) === 'default') {
                return $subj->text;
            }
            return iconv($subj->charset, static::$charset, $subj->text);
        }, $subject);

        return implode('', $subjectParts);
    }
protected function parseSubject ( $ subject ) { $ subject = imap_mime_header_decode ( $ subject ) ; $ subjectParts = array_map ( function ( $ subj ) { if ( strtolower ( $ subj -> charset ) === 'default' ) { return $ subj -> text ; } return iconv ( $ subj -> charset , static :: $ charset , $ subj -> text ) ; } , $ subject ) ; return implode ( '' , $ subjectParts ) ; }
Parse the subject of the email

@param  string $subject
@return string
Parse the subject of the email