class SentMessage
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Symfony\Component\Mailer\SentMessage
Expanded class hierarchy of SentMessage
11 files declare their use of SentMessage
- AbstractApiTransport.php in vendor/
symfony/ mailer/ Transport/ AbstractApiTransport.php - AbstractHttpTransport.php in vendor/
symfony/ mailer/ Transport/ AbstractHttpTransport.php - AbstractTransport.php in vendor/
symfony/ mailer/ Transport/ AbstractTransport.php - MessageHandler.php in vendor/
symfony/ mailer/ Messenger/ MessageHandler.php - NullTransport.php in vendor/
symfony/ mailer/ Transport/ NullTransport.php
File
-
vendor/
symfony/ mailer/ SentMessage.php, line 20
Namespace
Symfony\Component\MailerView source
class SentMessage {
private RawMessage $original;
private RawMessage $raw;
private string $messageId;
private string $debug = '';
/**
* @internal
*/
public function __construct(RawMessage $message, Envelope $envelope) {
$message->ensureValidity();
$this->original = $message;
if ($message instanceof Message) {
$message = clone $message;
$headers = $message->getHeaders();
if (!$headers->has('Message-ID')) {
$headers->addIdHeader('Message-ID', $message->generateMessageId());
}
$this->messageId = $headers->get('Message-ID')
->getId();
$this->raw = new RawMessage($message->toIterable());
}
else {
$this->raw = $message;
}
}
public function getMessage() : RawMessage {
return $this->raw;
}
public function getOriginalMessage() : RawMessage {
return $this->original;
}
public function getEnvelope() : Envelope {
return $this->envelope;
}
public function setMessageId(string $id) : void {
$this->messageId = $id;
}
public function getMessageId() : string {
return $this->messageId;
}
public function getDebug() : string {
return $this->debug;
}
public function appendDebug(string $debug) : void {
$this->debug .= $debug;
}
public function toString() : string {
return $this->raw
->toString();
}
public function toIterable() : iterable {
return $this->raw
->toIterable();
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
SentMessage::$debug | private | property | |
SentMessage::$messageId | private | property | |
SentMessage::$original | private | property | |
SentMessage::$raw | private | property | |
SentMessage::appendDebug | public | function | |
SentMessage::getDebug | public | function | |
SentMessage::getEnvelope | public | function | |
SentMessage::getMessage | public | function | |
SentMessage::getMessageId | public | function | |
SentMessage::getOriginalMessage | public | function | |
SentMessage::setMessageId | public | function | |
SentMessage::toIterable | public | function | |
SentMessage::toString | public | function | |
SentMessage::__construct | public | function | @internal |