Message
class Message implements Arrayable, JsonSerializable, MessageInterface (View source)
Traits
Properties
| protected IMessage|null | $parsed | The parsed message. |
from HasParsedMessage |
| protected BodyStructureCollection|null | $bodyStructure | The parsed body structure. |
Methods
Get the message's flags.
Add or remove a flag from the message.
Determine if the attachment should be treated as an embedded forwarded message.
Get a header from the message.
Determine if the message is empty.
Get the string representation of the message.
Constructor.
Get the names of properties that should be serialized.
Get the message's folder.
Get the message's identifier.
Get the message's size in bytes (RFC822.SIZE).
Get the message's raw headers.
Determine if the message has headers.
Get the message's raw body.
Determine if the message has contents.
Get the message's body structure.
Determine if the message has body structure data.
Copy the message to the given folder.
Move the message to the given folder.
Fetch a specific body part by part number.
Delete the message.
Restore the message.
Get the array representation of the message.
Get the JSON representation of the message.
Details
void
markRead()
{@inheritDoc}
void
markUnread()
{@inheritDoc}
void
markSeen()
{@inheritDoc}
void
unmarkSeen()
{@inheritDoc}
void
markAnswered()
{@inheritDoc}
void
unmarkAnswered()
{@inheritDoc}
void
markFlagged()
{@inheritDoc}
void
unmarkFlagged()
{@inheritDoc}
void
markDeleted(bool $expunge = false)
{@inheritDoc}
void
unmarkDeleted()
{@inheritDoc}
void
markDraft()
{@inheritDoc}
void
unmarkDraft()
{@inheritDoc}
void
markRecent()
{@inheritDoc}
void
unmarkRecent()
{@inheritDoc}
bool
isSeen()
{@inheritDoc}
bool
isAnswered()
{@inheritDoc}
bool
isFlagged()
{@inheritDoc}
bool
isDeleted()
{@inheritDoc}
bool
isDraft()
{@inheritDoc}
bool
isRecent()
{@inheritDoc}
bool
hasFlag(BackedEnum|string $flag)
{@inheritDoc}
array
flags()
Get the message's flags.
void
flag(BackedEnum|string $flag, string $operation, bool $expunge = false)
Add or remove a flag from the message.
CarbonInterface|null
date()
Get the message date and time.
string|null
messageId()
Get the message's message-id.
string|null
subject()
Get the message's subject.
Address|null
from()
Get the FROM address.
Address|null
sender()
Get the SENDER address.
Address|null
replyTo()
Get the REPLY-TO address.
array
inReplyTo()
Get the IN-REPLY-TO message identifier(s).
array
to()
Get the TO addresses.
array
cc()
Get the CC addresses.
array
bcc()
Get the BCC addresses.
array
attachments()
Get the message's attachments.
bool
hasAttachments()
Determine if the message has attachments.
int
attachmentCount()
Get the count of attachments.
protected bool
isForwardedMessage(IMessagePart $part)
Determine if the attachment should be treated as an embedded forwarded message.
array
addresses(string $header)
Get addresses from the given header.
string|null
html()
Get the message's HTML content.
string|null
text()
Get the message's text content.
array
headers()
Get all headers from the message.
IHeader|null
header(string $name, int $offset = 0)
Get a header from the message.
IMessage
parse()
Parse the message into a MailMimeMessage instance.
bool
isEmpty()
Determine if the message is empty.
string
__toString()
Get the string representation of the message.
__construct(FolderInterface $folder, int $uid, array $flags, string $head, string $body, int|null $size = null, ListData|null $bodyStructureData = null)
Constructor.
array
__sleep()
Get the names of properties that should be serialized.
FolderInterface
folder()
Get the message's folder.
int
uid()
Get the message's identifier.
int|null
size()
Get the message's size in bytes (RFC822.SIZE).
string
head()
Get the message's raw headers.
bool
hasHead()
Determine if the message has headers.
string
body()
Get the message's raw body.
bool
hasBody()
Determine if the message has contents.
BodyStructureCollection|null
bodyStructure()
Get the message's body structure.
bool
hasBodyStructure()
Determine if the message has body structure data.
bool
is(MessageInterface $message)
Determine if the message is the same as another message.
int|null
copy(string $folder)
Copy the message to the given folder.
int|null
move(string $folder, bool $expunge = false)
Move the message to the given folder.
string|null
bodyPart(string $partNumber, bool $peek = true)
Fetch a specific body part by part number.
void
delete(bool $expunge = false)
Delete the message.
void
restore()
Restore the message.
array
toArray()
Get the array representation of the message.
array
jsonSerialize()
Get the JSON representation of the message.