ews-cpp  0.9
Public Member Functions | Static Public Member Functions | Friends | List of all members
ews::message Class Referencefinal

A message item in the Exchange store. More...

#include <ews.hpp>

Inheritance diagram for ews::message:
ews::item

Public Member Functions

 message ()
 Constructs a new message object.
 
 message (item_id id)
 Constructs a new message object with the given id.
 
std::vector< mailboxget_bcc_recipients () const
 Returns the Bcc: recipients of this message.
 
std::vector< mailboxget_cc_recipients () const
 Returns the Cc: recipients of this message.
 
mailbox get_from () const
 Returns the From: header field of this message.
 
std::string get_internet_message_id () const
 Returns the Message-ID: header field of this email message. More...
 
std::vector< mailboxget_reply_to () const
 Returns the Reply-To: address list of this message.
 
mailbox get_sender () const
 Returns the Sender: header field of this message.
 
std::vector< mailboxget_to_recipients () const
 Returns the recipients of this message.
 
bool is_read () const
 Returns whether this message has been read.
 
void set_bcc_recipients (const std::vector< mailbox > &recipients)
 Sets the recipients that will receive a blind carbon copy of the message to recipients. More...
 
void set_cc_recipients (const std::vector< mailbox > &recipients)
 Sets the recipients that will receive a carbon copy of the message to recipients. More...
 
void set_from (const ews::mailbox &m)
 Sets the From: header field of this message.
 
void set_internet_message_id (const std::string &value)
 Sets the Message-ID: header field of this email message. More...
 
void set_is_read (bool value)
 Sets whether this message has been read. More...
 
void set_reply_to (const std::vector< mailbox > &recipients)
 Sets the addresses to which replies to this message should be sent. More...
 
void set_sender (const ews::mailbox &m)
 Sets the Sender: header field of this message.
 
void set_to_recipients (const std::vector< mailbox > &recipients)
 Sets the recipients of this message to recipients. More...
 
- Public Member Functions inherited from ews::item
 item ()
 Constructs a new item.
 
 item (item_id id)
 Constructs a new item with the given id.
 
std::vector< std::string > get_array_of_strings_helper (const char *name) const
 
std::vector< attachmentget_attachments () const
 Returns the items or files that are attached to this item.
 
body get_body () const
 Returns the body of this item.
 
std::vector< std::string > get_categories () const
 Returns the categories associated with this item. More...
 
std::string get_culture () const
 Returns the culture name associated with the body of this item.
 
date_time get_date_time_created () const
 Returns the date/time this item was created. More...
 
date_time get_date_time_received () const
 Date/Time an item was received. More...
 
date_time get_date_time_sent () const
 Returns the date/time this item was sent. More...
 
std::string get_display_cc () const
 Returns a nice string containing all Cc: recipients of this item. More...
 
std::string get_display_to () const
 Returns a nice string containing all To: recipients of this item. More...
 
std::vector< extended_propertyget_extended_properties () const
 
importance get_importance () const
 Returns the importance of this item.
 
std::string get_in_reply_to () const
 Returns the identifier of the item to which this item is a reply. More...
 
std::vector< internet_message_headerget_internet_message_headers () const
 Returns a collection of Internet message headers associated with this item. More...
 
std::string get_item_class () const
 Returns the PR_MESSAGE_CLASS MAPI property (the message class) for an item.
 
const item_idget_item_id () const EWS_NOEXCEPT
 Returns the id of an item.
 
mime_content get_mime_content () const
 Base64-encoded contents of the MIME stream of this item.
 
folder_id get_parent_folder_id () const
 Returns a unique identifier for the folder that contains this item. More...
 
date_time get_reminder_due_by () const
 Returns the due date of this item. More...
 
uint32_t get_reminder_minutes_before_start () const
 Returns the number of minutes before due date that a reminder should be shown to the user.
 
sensitivity get_sensitivity () const
 Returns the sensitivity level of this item.
 
size_t get_size () const
 Size in bytes of an item. More...
 
std::string get_subject () const
 Returns this item's subject.
 
bool has_attachments () const
 True if this item has non-hidden attachments. More...
 
bool is_draft () const
 True if this item is a draft. More...
 
bool is_from_me () const
 True if this item is from you. More...
 
bool is_reminder_enabled () const
 True if a reminder has been enabled on this item.
 
bool is_resend () const
 True if this item a re-send. More...
 
bool is_submitted () const
 True if this item has been submitted for delivery. More...
 
bool is_unmodified () const
 True if this item is unmodified. More...
 
void set_array_of_strings_helper (const std::vector< std::string > &strings, const char *name)
 
void set_body (const body &b)
 Sets the body of this item.
 
void set_categories (const std::vector< std::string > &categories)
 Sets this item's categories. More...
 
void set_culture (const std::string &culture)
 Sets the culture name associated with the body of this item.
 
void set_extended_property (const extended_property &extended_prop)
 Sets an extended property of an item.
 
void set_importance (importance i)
 Sets the importance of the item.
 
void set_reminder_due_by (const date_time &due_by)
 Sets the due date of this item. More...
 
void set_reminder_enabled (bool enabled)
 Set a reminder on this item.
 
void set_reminder_minutes_before_start (uint32_t minutes)
 Sets the minutes before due date that a reminder should be shown to the user.
 
void set_sensitivity (sensitivity s)
 Sets the sensitivity level of this item.
 
void set_subject (const std::string &subject)
 Sets this item's subject. Limited to 255 characters.
 

Static Public Member Functions

static message from_xml_element (const rapidxml::xml_node<> &elem)
 Makes a message instance from a <Message> XML element.
 

Friends

template<typename U >
class basic_service
 

Detailed Description

A message item in the Exchange store.

Member Function Documentation

std::string ews::message::get_internet_message_id ( ) const
inline

Returns the Message-ID: header field of this email message.

This function can be used to retrieve the <InternetMessageId> property of this message. The property provides the unique message identifier according to the RFCs for email, RFC 822 and RFC 2822.

void ews::message::set_bcc_recipients ( const std::vector< mailbox > &  recipients)
inline

Sets the recipients that will receive a blind carbon copy of the message to recipients.

Setting this property sets the Bcc: header field as described in RFC

void ews::message::set_cc_recipients ( const std::vector< mailbox > &  recipients)
inline

Sets the recipients that will receive a carbon copy of the message to recipients.

Setting this property sets the Cc: header field as described in RFC

void ews::message::set_internet_message_id ( const std::string &  value)
inline

Sets the Message-ID: header field of this email message.

Note that it is not possible to change a message's Message-ID value. This means that updating this property via the ews::message_property_path::internet_message_id property path will most certainly be rejected by the Exchange server. However, setting this property when creating a new message is absolutely fine.

See also
get_internet_message_id()
void ews::message::set_is_read ( bool  value)
inline

Sets whether this message has been read.

If is_read_receipt_requested() evaluates to true, updating this property to true sends a read receipt.

void ews::message::set_reply_to ( const std::vector< mailbox > &  recipients)
inline

Sets the addresses to which replies to this message should be sent.

Setting this property sets the Reply-To: header field as described in RFC 5322.

void ews::message::set_to_recipients ( const std::vector< mailbox > &  recipients)
inline

Sets the recipients of this message to recipients.

Setting this property sets the To: header field as described in RFC


The documentation for this class was generated from the following file: