MessageInterface
interface MessageInterface implements FlaggableInterface, Stringable (View source)
Methods
Determine if the message has the given flag.
Add or remove a flag from the message.
Get the message's identifier.
Get the message's size in bytes (RFC822.SIZE).
Get the message date and time.
Get the message's subject.
Get the message's 'Message-ID'.
Get the 'In-Reply-To' message identifier(s).
Get the 'To' addresses.
Get the 'CC' addresses.
Get the 'BCC' addresses.
Get the message's attachments.
Determine if the message has attachments.
Get the count of attachments.
Get addresses from the given header.
Get the message's HTML content.
Get the message's text content.
Get all headers from the message.
Get a header from the message.
Parse the message into a MailMimeMessage instance.
Get the string representation of the message.
Details
void
markRead()
Mark the message as read. Alias for markSeen.
void
markUnread()
Mark the message as unread. Alias for unmarkSeen.
void
markSeen()
Mark the message as seen.
void
unmarkSeen()
Unmark the seen flag.
void
markAnswered()
Mark the message as answered.
void
unmarkAnswered()
Unmark the answered flag.
void
markFlagged()
Mark the message as flagged.
void
unmarkFlagged()
Unmark the flagged flag.
void
markDeleted(bool $expunge = false)
Mark the message as deleted.
void
unmarkDeleted()
Unmark the deleted flag.
void
markDraft()
Mark the message as a draft.
void
unmarkDraft()
Unmark the draft flag.
void
markRecent()
Mark the message as recent.
void
unmarkRecent()
Unmark the recent flag.
bool
isSeen()
Determine if the message is marked as seen.
bool
isAnswered()
Determine if the message is marked as answered.
bool
isFlagged()
Determine if the message is flagged.
bool
isDeleted()
Determine if the message is marked as deleted.
bool
isDraft()
Determine if the message is marked as a draft.
bool
isRecent()
Determine if the message is marked as recent.
array
flags()
Get the message's flags.
bool
hasFlag(BackedEnum|string $flag)
Determine if the message has the given flag.
void
flag(BackedEnum|string $flag, string $operation, bool $expunge = false)
Add or remove a flag from the message.
int
uid()
Get the message's identifier.
int|null
size()
Get the message's size in bytes (RFC822.SIZE).
CarbonInterface|null
date()
Get the message date and time.
string|null
subject()
Get the message's subject.
Address|null
from()
Get the 'From' address.
Address|null
sender()
Get the 'Sender' address.
string|null
messageId()
Get the message's 'Message-ID'.
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.
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
is(MessageInterface $message)
Determine if the message is the same as another message.
string
__toString()
Get the string representation of the message.