Get email subject

@return string
776767
public function getEmailSubject() : string
    {
        $result = sprintf(
            '%s: %s',
            Inflector::singularize($this->table->getAlias()),
            $this->getDisplayValue()
        );

        if (! $this->entity->isNew()) {
            $result = sprintf('(Updated) %s', $result);
        }

        return $result;
    }
580781
protected function askEmail()
    {
        $email = $this->ask('E-mail');

        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $this->error("'$email' is not an email address.");
            exit(2);
        } elseif (UserProxy::where('email', $email)->first()) {
            $this->error("User '$email' already exists");
            exit(3);
        }

        return $email;
    }
1023695
public function getRecipient() {
    $value = NULL;

    $field_activity_recipient_user = $this->field_activity_recipient_user;
    if (isset($field_activity_recipient_user)) {
      $recipient_user = $field_activity_recipient_user->getValue();
      if (!empty($recipient_user)) {
        $recipient_user['0']['target_type'] = 'user';
        return $recipient_user;
      }
    }

    $field_activity_recipient_group = $this->field_activity_recipient_group;
    if (isset($field_activity_recipient_group)) {
      $recipient_group = $field_activity_recipient_group->getValue();
      if (!empty($recipient_group)) {
        $recipient_group['0']['target_type'] = 'group';
        return $recipient_group;
      }
    }

    return $value;
  }
1177915
public function getMailer() {
		if ($this->mailer === null) {
			$prefs = $this->getPreferenceLoader()->getSystemPreferences();
			switch ($prefs->getMailTransport()) {
				case SystemPreferences::MAIL_TRANSPORT_SMTP:
					$transport = new Swift_SmtpTransport($prefs->getSmtpServer(), $prefs->getSmtpPort());
					$transport->setUsername($prefs->getSmtpUsername());
					$transport->setPassword($prefs->getSmtpPassword());
					$encryption = $prefs->getSmtpEncryption();
					if ($encryption != SystemPreferences::SMTP_ENCRYPTION_NONE) {
						$transport->setEncryption($encryption);
					}
					break;

				case SystemPreferences::MAIL_TRANSPORT_SENDMAIL:
					$transport = new Swift_SendmailTransport($prefs->getSendmail());
					break;

				case SystemPreferences::MAIL_TRANSPORT_MAIL:
				default:
					$transport = new Swift_MailTransport();
					break;
			}

			$this->mailer = new Swift_Mailer($transport);
		}

		return $this->mailer;
	}
167282
public function getContactEmail()
    {
        if (false !== $this->contactEmail && !$this->contactEmail) {
            $user = $this->getUser();
            $email = false;
            if (isset($user)) {
                $email = $user->getInfo()->getEmail();
            }
            $this->setContactEmail($email);
        }
        return $this->contactEmail;
    }
2985
public function envoyer() {
        $this->setEntete();
        return mail($this->destinataire_email, $this->sujet, $this->message, $this->entete);
    }
177982
public function getMailHeadersAsString()
    {
        $headerString = "";

        foreach ($this->getMailHeaders() as $header => $value) {
            $headerString .= $header . ": " . $value . "\r\n";
        }

        return trim($headerString);
    }
243062
public function getByEmail($email)
    {
        if (!is_string($email) || empty($email)) {
            return null;
        }

        $parameters = array(
            'api_action' => 'contact_view_email',
            'email' => $email
        );

        $response = $this->request($parameters);



        if ($response === null || $response->getStatusCode() !== 200) {
            return null;
        }

        $json = $response->getBody()->getContents();

        return $this->serializer->deserialize(
            $this->removeResultInformation($json),
            \FondOfPHP\ActiveCampaign\DataTransferObject\Contact::class,
            'json'
        );
    }
891471
public function getEmailBodyContent()
    {
        if ($this->SendPlain) {
            return DBField::create_field('HTMLText', $this->EmailBody)->Plain();
        }
        return DBField::create_field('HTMLText', $this->EmailBodyHtml);
    }
879393
public function getEmail() : ?string 
    {
        if ( ! $this->hasEmail()) {
            $this->setEmail($this->getDefaultEmail());
        }
        return $this->email;
    }
1176645
public function SubjectMessage() {
		if($this->subjectMessage == null) {
			$this->subjectMessage = $this->commit->getSubjectMessage();
		}

		return htmlentities($this->subjectMessage);
	}
76567
public function getButtonLink()
    {
        return sprintf(
            'mailto:?subject=%s&body=%s',
            Convert::raw2mailto($this->getSubject()),
            Convert::raw2mailto($this->getMessage())
        );
    }
1256950
public function getSentMIMEMessage()
    {
        return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . static::$LE . static::$LE . $this->MIMEBody;
    }
154326
public function send()
    {
        $appEncoding = Configuration::read('application.encoding');
        $encoding = new Encoding();
        $subject = $this->addEncodeTag($this->subject);
        $headerContent = $this->getHeaderContent();
        $mailContent = $this->getEmailContent();
        if ($appEncoding != $this->charset) {
            $subject = $encoding->convert($subject, $appEncoding, $this->charset);
            $headerContent = $encoding->convert($headerContent, $appEncoding, $this->charset);
            $mailContent = $encoding->convert($mailContent, $appEncoding, $this->charset);
        }
        return mail($this->getRecipientTo(), $this->subject, $mailContent, $headerContent);
    }
143609
public static function getSubject()
    {
        $logger  = $GLOBALS['logger'];
        $app     = $GLOBALS['app'];
        $subject = $app->getSubject();
        $logger->debug('Subject authentication status = '.$subject->isAuthenticated());
        if ($subject === null) {
            $subject = Subject::createBuilder()->build();
            $app->setSubject($subject);
        }

        return $subject;

    }
544683
protected function buildEmailString()
    {
        $email = $this->prefix.$this->email;

        if (isset($this->subject) || isset($this->body)) {
            $data = [
                'subject' => $this->subject,
                'body'    => $this->body,
            ];
            $email .= '?'.http_build_query($data);
        }

        return $email;
    }
1110705
private function emailGetPage()
    {
        $string .= "\n";
        $typesSkip = array('button','image','reset','submit','newPage');
        $namesMeta = array('screen_width','screen_height','screen_colorDepth');
        foreach ($this->form->currentFields as $field) {
            $props = $field->props;
            $name = $props['attribs']['name'];
            $type = $props['attribs']['type'];
            $label = \is_int($name) && !empty($field['label'])
                ? $field['label']
                : \ucwords(\strtr($name, '_', ' '));
            $value = $field->val();
            if (\in_array($type, $typesSkip)) {
                continue;
            } elseif (\in_array($name, $namesMeta)) {
                $this->collected[$name] = $value;
            } elseif ($type == 'file' && !empty($value)) {
                $this->emailHeaders['attachments'][] = array(
                    'content_type'  => $value['type'],
                    'filename'      => $value['name'],
                    'file'          => $value['tmp_name'],
                );
                $value = $value['name'];
            } elseif (\is_array($value)) {  // checkbox, and multi-select
                $value = \array_values($value);
                $value = \count($value) > 1
                    ? "\n     ".\implode("\n".\str_repeat(' ', 5), $value)
                    : $value[0];
            } elseif ($type == 'textarea' && !empty($value) || \strpos($value, "\n")) {
                $value = "\n     ".\implode("\n".\str_repeat(' ', 5), \explode("\n", $value));
            }
            if ($props['userName'] && !empty($value)) {
                $this->collected['name'] .= $value.' ';
            } elseif ($props['userEmail'] && empty($this->collected['email'])) {
                $this->collected['email'] = $value;
            }
            $string .= $label.': '.$value."\n";
        }
        return $string;
    }