Class MessageInfo
Defined in File message_info.hpp
Class Documentation
-
class MessageInfo
Message info container.
Contains metadata about a received message.
Public Functions
-
MessageInfo(const Timestamp &source_timestamp, const Timestamp &received_timestamp, const Gid &publisher_gid)
Constructor.
-
MessageInfo(const MessageInfo&) = default
-
~MessageInfo()
Public Static Functions
-
static std::optional<MessageInfo> from_headers(const EmailHeaders &headers)
Get a MessageInfo object from email headers.
The received timestamp will be created using Timestamp::now().
- Parameters:
headers – the email headers
- Returns:
the message info object, or
std::nullopt
if the email headers don’t contain the expected info
Public Static Attributes
-
static constexpr auto HEADER_PUBLISHER_GID = "Publisher-GID"
Custom header name for publisher GID.
-
MessageInfo(const Timestamp &source_timestamp, const Timestamp &received_timestamp, const Gid &publisher_gid)