Устанавливает заголовок

@param string $subject

@return EForms_Mail

@since 1.00
@uses ezcMail::$subject
@uses ezcMail::$subjectCharset
173576
public function setSubject($subject)
	{
		$this->getComposer()->subject = $subject;
		$this->getComposer()->subjectCharset = CHARSET;

		return $this;
	}
439493
public function ascii($subject) : bool
    {
        if ($subject === null) {
            return false;
        }
        $v = '' . $subject;
        return $v === '' ? true : !!preg_match('/^[[:ascii:]]+$/', $v);
    }
388317
public function decorate($subject)
    {
        foreach ($subject as $key => $atom) {
            $subject[$key] = $this->autoPresenter->decorate($atom);
        }

        return $subject;
    }
1002063
public function find($subject)
    {
        if (isset($this->found[$subject])) {
            return $this->serializers[$this->found[$subject]];
        }
        foreach ($this->serializers as $i => $serializer) {
            if ( ! $serializer->accepts($subject)) {
                continue;
            }
            $this->found[$subject] = $i;
            return $serializer;
        }
        throw new RuntimeException(sprintf(
            'No serializer for %s',
            $subject
        ));
    }
1032633
public function unicode($subject) : bool
    {
        if ($subject === null) {
            return false;
        }
        $v = '' . $subject;
        return $v === '' ? true :
            // The PHP regex u modifier forces the whole subject to be evaluated
            // as UTF-8. And if any byte sequence isn't valid UTF-8 preg_match()
            // will return zero for no-match.
            // The s modifier makes dot match newline; without it a string consisting
            // of a newline solely would result in a false negative.
            !!preg_match('/./us', $v);
    }
697616
protected function sendMail(UserRegistrationInterface $registrationRecord, $subject, $template)
    {
        $user = $registrationRecord->getUser();
        $message = $this->mailService->compose(
            ['to' => $user->getEmail()], 
            $template, 
            ['user' => $user, 'registrationRecord' => $registrationRecord]
        );

        $fromEmail = $this->options->getEmailFromAddress();
        if ($fromEmail) {
            $message->setFrom($fromEmail);
        }

        $message->setSubject($subject);

        return $this->mailService->send($message);        
    }
345175
public function build($to, $subject, $message)
    {
        $mail = new \Swift_Message($subject, $message, 'text/html', 'UTF-8');
        $mail->setFrom($this->from, $this->fromName);
        $mail->setTo($to);
        return $mail;
    }
818879
public function send($to, $subject, $message, $from = 'default', $headerExtra = [], $html = true) {
        if (!is_null($this->method)) { // if a method is set then use that one
            if (is_string($this->method) && ('swift' == $this->method)) {
                return $this->_swiftMail($to, is_string($from) ? $this->from[$from] : $from, $subject, $message, [], $html);
            } else {
                return call_user_func($this->method, $to, is_string($from) ? $this->from[$from] : $from, $subject, $message, [], $headerExtra, $html);
            }
        } // if not use default
        return $this->_mail($to, is_string($from) ? $this->from[$from] : $from, $subject, $message, [], $headerExtra, $html);
    }
711852
protected function renderEmail(
        $subject,
        $receiverEmail,
        array $context = []
    ) {
        $message = Swift_Message::newInstance()
            ->setSubject($subject)
            ->setFrom($this->fromEmail)
            ->setTo($receiverEmail)
            ->setContentType('text/html')
            ->setBody(
                $this->templatingEngine->render(
                    $this->template,
                    array_merge(
                        $context,
                        ['layout' => $this->layout]
                    )
                )
            );

        $this
            ->mailer
            ->send($message);

        return $this;
    }
113827
public function subject($subject = null)
    {
        deprecationWarning('Email::subject() is deprecated. Use Email::setSubject() or Email::getSubject() instead.');

        if ($subject === null) {
            return $this->getSubject();
        }

        return $this->setSubject($subject);
    }
1343233
protected function sendEmail(array $recipient, array $from, $subject, $bodyHTML = '', $bodyPlain = '', array $replyTo = NULL)
    {

        if ($replyTo == NULL) {
            $replyTo = $from;
        }
        $mail = GeneralUtility::makeInstance(MailMessage::class);
        $mail
            ->setTo($recipient)
            ->setFrom($from)
            ->setReplyTo($replyTo)
            ->setSubject($subject);

        if ($bodyHTML !== '' && $bodyHTML !== NULL ) {
            $mail->addPart($bodyHTML, 'text/html');
        }
        if ($bodyPlain !== '' && $bodyPlain !== NULL ) {
            $mail->addPart($bodyPlain, 'text/plain');
        }

        return $mail->send();
    }
459420
public function createMessage($subject = null, $content = null, $html = true)
    {
        $class = $this->messageClass;

        $message = new $class($subject, $content, $html);

        $this->triggerEvent('onMailerAfterCreateMessage', [
            'message' => $message,
            'manager' => $this,
        ]);

        return $message;
    }
1108945
public function email($subject) : bool
    {
        if ($subject === null) {
            return false;
        }
        // FILTER_VALIDATE_EMAIL doesn't reliably require .tld.
        $v = '' . $subject;
        return $v === '' ? false : (
            !!filter_var($v, FILTER_VALIDATE_EMAIL)
            && !!preg_match('/\.[a-zA-Z\d]+$/', $v)
        );
    }
4259
public function getAssignmentForSubject(Subject $subject)
    {
        return $this->assignmentStorage->getAssignment($subject->getSubjectId(), $subject->getSubjectName());
    }
559568
public static function send($address, $subject, $body, $account = 'default')
    {
        $HTML     = true;
        $accounts = \Phramework\Phramework::getSetting('email');

        if (!$accounts || !isset($accounts['default'])) {
            throw new \Exception('email setting is required');
        }

        if (!isset($accounts[$account])) {
            $account = 'default';
        }

        $headers   = [];
        $headers[] = "MIME-Version: 1.0" . "\r\n";

        if (!$HTML) {
            $headers[] = 'Content-Type: text/plain;charset=utf-8' . "\r\n";
        } else {
            $headers[] = 'Content-Type: text/html;charset=utf-8' . "\r\n";
        }

        $headers[] = 'From: ' . $accounts[$account]['name'] . ' <' . $accounts[$account]['mail'] . '>' . "\r\n";
        $headers[] = 'Reply-To: ' . $accounts[$account]['name'] . ' <' . $accounts[$account]['mail'] . "\r\n";

        mail($address, $subject, $body, implode('', $headers), ('-f' . $accounts[$account]['mail']));
    }
488297
public function render(Subject $subject)
    {
        $this->injectViewClasses();
        $this->_ensureSuccess($subject);
        $this->_ensureData($subject);
        $this->_ensureSerialize();

        return $this->_controller()->render();
    }
722474
public function sendEmail($subject, $view, $vars = [])
    {
        $vars['email'] = $email = $this->email;
        $vars['username'] = $username = $this->username;

        Mail::queue(['text' => $view], $vars, function ($message) use ($email, $username, $subject) {
            $message->subject($subject)->to($email, $username);

            if (config()->has('mail.reply_to')) {
                $message->replyTo(
                    config('mail.reply_to.email'),
                    config('mail.reply_to.name')
                );
            }
        });
    }