The message to be sent.

@param string $Message The message to be sent.
@param string $TextVersion Optional plaintext version of the message
@return Email
436285
public function Message($Message) {
   
      // htmlspecialchars_decode is being used here to revert any specialchar escaping done by Gdn_Format::Text()
      // which, untreated, would result in &#039; in the message in place of single quotes.
   
      if ($this->PhpMailer->ContentType == 'text/html') {
         $TextVersion = FALSE;
         if (stristr($Message, '<!-- //TEXT VERSION FOLLOWS//')) {
            $EmailParts = explode('<!-- //TEXT VERSION FOLLOWS//', $Message);
            $TextVersion = array_pop($EmailParts);
            $Message = array_shift($EmailParts);
            $TextVersion = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$TextVersion)));
            $Message = trim($Message);
         }
         
         $this->PhpMailer->MsgHTML(htmlspecialchars_decode($Message,ENT_QUOTES));
         if ($TextVersion !== FALSE && !empty($TextVersion)) {
            $TextVersion = html_entity_decode($TextVersion);
            $this->PhpMailer->AltBody = $TextVersion;
         }
      } else {
         $this->PhpMailer->Body = htmlspecialchars_decode($Message,ENT_QUOTES);
      }
      return $this;
   }
1329678
public function send(MailMessage $message)
    {
        $msg = \Swift_Message::newInstance();

        $type = $message->getHtml() ? 'text/html' : null;

        $msg->setSubject($message->getSubject())
            ->setTo($message->getTo())
            ->setFrom($message->getFrom())
            ->setCc($message->getCc())
            ->setBcc($message->getBcc())
            ->setReplyTo($message->getReplyTo())
            ->setBody($message->getBody(), $type, 'utf8');

        $files = $message->getFiles();

        foreach ($files as $file) {
            $attach = \Swift_Attachment::newInstance();

            if ($file->getFilename()) {
                $attach->setFilename($file->getFilename());
            }

            if ($file->getContentType()) {
                $attach->setContentType($file->getContentType());
            }

            $attach->setBody($file->getBody());

            $msg->attach($attach);
        }

        return $this->getMailer()->send($msg);
    }
131907
public function decrypt(Message $message): Message
    {
        $gnupg = new \Crypt_GPG($this->options);

        try {
            $gnupg->addDecryptKey($this->serverKeyFingerprint);
            // Replace the message with its encrypted counterpart
            $decrypted = $gnupg->decrypt($message->getBodyText());
            return (clone $message)->setBody($decrypted);
        } catch (\PEAR_Exception $ex) {
            throw new GPGMailerException(
                'Could not decrypt message: ' . $ex->getMessage(),
                $ex->getCode(),
                $ex
            );
        }
    }
868464
public function withMessage(string $message): PayloadInterface
    {
        if ($this->message === $message) {
            return $this;
        }

        $clone = clone $this;
        $clone->message = $message;

        return $clone;
    }
795153
public function send(MessageInterface $message)
    {
        if (!$this->supports($message->getTargetOS())) {
            throw new \RuntimeException("OS type {$message->getTargetOS()} not supported");
        }

        return $this->handlers[$message->getTargetOS()]->send($message);
    }
313221
public function a($message) {
        return isset($this->messages[$message]) ? $this->messages[$message] : $message;
    }
928325
public function sendMessage($message)
    {
        $message = sprintf("%s\r\n", $message);
        fwrite($this->getSocketStream(), $message, strlen($message));
        return $this->receiveMessage();
    }
377194
public function sms($phone, $message = null) {
        $phone = 'sms:'.$phone;
        if (!is_null($message)) {
            $phone .= ':'. $message;
        }
        return $this->encode($phone);
    }
364229
public function respondUpdated($message = "Updated")
    {
        $reponse = $this->setStatusCode(ResponseHTTP::HTTP_ACCEPTED)
            ->respondWithMessage($message);
        return $reponse;
    }
15749
public function send($message = null)
    {
        if ($message) {
            $this->message($message);
        }

        if (empty($this->message)) {
            throw new RuntimeException('No message to send.');
        }

        if (is_null($this->agentId)) {
            throw new RuntimeException('No agentid specified.');
        }

        $message = $this->message->transformForJsonRequest(array_merge([
            'agentid' => $this->agentId,
            'safe' => intval($this->secretive),
        ], $this->to));

        $this->secretive = false;

        return $this->client->send($message);
    }
1243968
public function wrapAndSerialize($message)
    {
        $envelope = $this->envelopeFactory->wrapMessageInEnvelope($message);

        $serializedMessage = $this->objectSerializer->serialize($message);

        return $this->objectSerializer->serialize($envelope->withSerializedMessage($serializedMessage));
    }
926498
public function reply ($message) {
		// Make sure we actually have a text to reply to
		if (!$this->inbound_message) {
			return false;
		}

		return $this->sendText($this->from, $this->to, $message);
	}
804037
public MessageProtocol withVersion(String version) {
        return new MessageProtocol(contentType, charset, Optional.ofNullable(version));
    }
1038897
public function gettext($message) {
		$args = func_get_args();
		$methodArgsNumber = 1;
		$message = $this->callMethodAndSprintf(__FUNCTION__, $args, $methodArgsNumber);
		return $message;
	}
1140110
private function getMessage(string $subject, string $message): \Swift_Message
    {
        $messageObject = new \Swift_Message($subject, $message);
        $messageObject
            ->setFrom([$this->config('mailer.sender_email') => $this->config('mailer.sender_name')])
            ->setTo($this->config('mailer.recipients'))
        ;

        return $messageObject;
    }
88083
def SendVersion(self):
        """"""
        m = Message("version", VersionPayload(settings.NODE_PORT, self.remote_nodeid, settings.VERSION_NAME))
        self.SendSerializedMessage(m)
355508
function Send($message)
    {
        $mailer = new PHPMailer();

		// this prevents problems with phpmailer not being able to locate the language path
		$mailer->SetLanguage("en", $this->LangPath );

        $mailer->From = $message->From->Email;
        $mailer->FromName = $message->From->RealName;
        if ($message->ReplyTo) $mailer->AddReplyTo($message->ReplyTo->Email,$message->ReplyTo->RealName);
        $mailer->Subject = $message->GetSubject();
        $mailer->Body = $this->FixBareLB($message->GetBody());
        $mailer->ContentType = ($message->Format == MESSAGE_FORMAT_TEXT) ? "text/plain" : "text/html";
        $mailer->Mailer = strtolower($this->Method);
        $mailer->Host = $this->Path;
        $mailer->Sendmail = $this->Path;

        // use authentication if necessary
        if ($this->AuthUsername)
        {
        	  $mailer->SMTPAuth = true;
        	  $mailer->Username = $this->AuthUsername;
        	  $mailer->Password = $this->AuthPassword;
        }
        
        // if custom headers are to be provided, include them in the message
        foreach ($message->Headers as $header_key => $header_val) 
        {
        	$mailer->AddCustomHeader($header_key.': '.$header_val);
        }

		if ($message->Sender)
		{
			$this->_log[] = "Adding Sender ".$message->Sender;

			// phpmailer accepts this but it seems to not work consistently..?
			// $mailer->Sender = $message->Sender;

			// instead add the dang headers ourselves
			$mailer->AddCustomHeader("Sender: " . $message->Sender);
			$mailer->AddCustomHeader("Return-Path: " . $message->Sender);
		}

		if (!$this->IsValid($mailer->From))
		{
			$this->_errors[] = "Sender '".$mailer->From."' is not a valid email address.";
			return MAILER_RESULT_FAIL;
		}

		// add the recipients
        foreach ($message->Recipients as $recipient)
        {
			$this->_log[] = "Adding Recipient ".$recipient->RealName." [".$recipient->Email."]";

			if (!$this->IsValid($recipient->Email))
			{
				$this->_errors[] = "Recipient '".$recipient->Email."' is not a valid email address.";
				return MAILER_RESULT_FAIL;
			}

			$mailer->AddAddress($recipient->Email,$recipient->RealName);

		}

		foreach ($message->CCRecipients as $recipient)
        {
			$this->_log[] = "Adding CC Recipient ".$recipient->RealName." [".$recipient->Email."]";

			if (!$this->IsValid($recipient->Email))
			{
				$this->_errors[] = "CC Recipient '".$recipient->Email."' is not a valid email address.";
				return MAILER_RESULT_FAIL;
			}

			$mailer->AddCC($recipient->Email,$recipient->RealName);
		}

		foreach ($message->BCCRecipients as $recipient)
        {
			$this->_log[] = "Adding BCC Recipient ".$recipient->RealName." [".$recipient->Email."]";

			if (!$this->IsValid($recipient->Email))
			{
				$this->_errors[] = "BCC Recipient '".$recipient->Email."' is not a valid email address.";
				return MAILER_RESULT_FAIL;
			}

			$mailer->AddBCC($recipient->Email,$recipient->RealName);
		}

        $result = MAILER_RESULT_OK;

        $this->_log[] = "Sending message using " . $mailer->Mailer;

        ob_start(); // buffer output because class.phpmailer.php Send() is chatty and writes to stdout

        $fail = !$mailer->Send();

		ob_end_clean(); // clear the buffer

        if ( $fail || $mailer->ErrorInfo)
        {
            $result = MAILER_RESULT_FAIL;
            $this->_errors[] = trim( str_replace(array('<p>','</p>'),array(', ',''),$mailer->ErrorInfo) );
        }

        return $result;
    }