public function setSubject($subject)
    {
        if ($subject === '') {
            throw new \InvalidArgumentException('$subject must not be empty.', 1331488802);
        }

        if ((strpos($subject, CR) !== false) || (strpos($subject, LF) !== false)) {
            throw new \InvalidArgumentException(
                '$subject must not contain any line breaks or carriage returns.',
                1331488817
            );
        }

        $this->setAsString('subject', $subject);
    }
public function setSubject($subject)
    {
        if ($subject === '') {
            throw new \InvalidArgumentException('$subject must not be empty.', 1331488802);
        }

        if ((strpos($subject, CR) !== false) || (strpos($subject, LF) !== false)) {
            throw new \InvalidArgumentException(
                '$subject must not contain any line breaks or carriage returns.',
                1331488817
            );
        }

        $this->setAsString('subject', $subject);
    }
public function setSubject ( $ subject ) { if ( $ subject === '' ) { throw new \ InvalidArgumentException ( '$subject must not be empty.' , 1331488802 ) ; } if ( ( strpos ( $ subject , CR ) !== false ) || ( strpos ( $ subject , LF ) !== false ) ) { throw new \ InvalidArgumentException ( '$subject must not contain any line breaks or carriage returns.' , 1331488817 ) ; } $ this -> setAsString ( 'subject' , $ subject ) ; }
Sets the subject of the e-mail.

@param string $subject the subject of the e-mail, must not be empty

@return void

@throws \InvalidArgumentException
Sets the subject of the e - mail .