## CamelMessageInfo CamelMessageInfo |

## Functions

CamelMessageInfo * | camel_message_info_new ()
CamelMessageInfo * | camel_message_info_clone ()
gboolean | camel_message_info_load ()
gboolean | camel_message_info_save ()
struct _CamelFolderSummary * | camel_message_info_ref_summary ()
void | camel_message_info_property_lock ()
void | camel_message_info_property_unlock ()
gboolean | camel_message_info_get_dirty ()
void | camel_message_info_set_dirty ()
gboolean | camel_message_info_get_folder_flagged ()
gboolean | camel_message_info_set_folder_flagged ()
guint | camel_message_info_get_folder_flagged_stamp ()
gboolean | camel_message_info_get_abort_notifications ()
void | camel_message_info_set_abort_notifications ()
void | camel_message_info_freeze_notifications ()
void | camel_message_info_thaw_notifications ()
gboolean | camel_message_info_get_notifications_frozen ()
const gchar * | camel_message_info_get_uid ()
const gchar * | camel_message_info_pooldup_uid ()
gboolean | camel_message_info_set_uid ()
guint32 | camel_message_info_get_flags ()
gboolean | camel_message_info_set_flags ()
gboolean | camel_message_info_get_user_flag ()
gboolean | camel_message_info_set_user_flag ()
const CamelNamedFlags * | camel_message_info_get_user_flags ()
CamelNamedFlags * | camel_message_info_dup_user_flags ()
gboolean | camel_message_info_take_user_flags ()
const gchar * | camel_message_info_get_user_tag ()
gchar * | camel_message_info_dup_user_tag ()
gboolean | camel_message_info_set_user_tag ()
const CamelNameValueArray * | camel_message_info_get_user_tags ()
CamelNameValueArray * | camel_message_info_dup_user_tags ()
gboolean | camel_message_info_take_user_tags ()
const gchar * | camel_message_info_get_subject ()
gboolean | camel_message_info_set_subject ()
const gchar * | camel_message_info_get_from ()
gboolean | camel_message_info_set_from ()
const gchar * | camel_message_info_get_to ()
gboolean | camel_message_info_set_to ()
const gchar * | camel_message_info_get_cc ()
gboolean | camel_message_info_set_cc ()
const gchar * | camel_message_info_get_mlist ()
gboolean | camel_message_info_set_mlist ()
guint32 | camel_message_info_get_size ()
gboolean | camel_message_info_set_size ()
gint64 | camel_message_info_get_date_sent ()
gboolean | camel_message_info_set_date_sent ()
gint64 | camel_message_info_get_date_received ()
gboolean | camel_message_info_set_date_received ()
guint64 | camel_message_info_get_message_id ()
gboolean | camel_message_info_set_message_id ()
const GArray * | camel_message_info_get_references ()
GArray * | camel_message_info_dup_references ()
gboolean | camel_message_info_take_references ()
const CamelNameValueArray * | camel_message_info_get_headers ()
CamelNameValueArray * | camel_message_info_dup_headers ()
gboolean | camel_message_info_take_headers ()
const gchar * | camel_message_info_get_user_header ()
gchar * | camel_message_info_dup_user_header ()
gboolean | camel_message_info_set_user_header ()
const CamelNameValueArray * | camel_message_info_get_user_headers ()
CamelNameValueArray * | camel_message_info_dup_user_headers ()
gboolean | camel_message_info_take_user_headers ()
const gchar * | camel_message_info_get_preview ()
gchar * | camel_message_info_dup_preview ()
gboolean | camel_message_info_set_preview ()
void | camel_message_info_dump ()

## Properties

gboolean | abort-notifications | Read / Write
char * | cc | Read / Write
gint64 | date-received | Read / Write
gint64 | date-sent | Read / Write
gboolean | dirty | Read / Write
CamelMessageFlags | flags | Read / Write
gboolean | folder-flagged | Read / Write
guint | folder-flagged-stamp | Read
char * | from | Read / Write
CamelNameValueArray * | headers | Read / Write
guint64 | message-id | Read / Write
char * | mlist | Read / Write
char * | preview | Read / Write
GArray * | references | Read / Write
guint | size | Read / Write
char * | subject | Read / Write
CamelFolderSummary * | summary | Read / Write / Construct Only
char * | to | Read / Write
char * | uid | Read / Write
CamelNamedFlags * | user-flags | Read / Write
CamelNameValueArray * | user-headers | Read / Write
CamelNameValueArray * | user-tags | Read / Write

## Types and Values

| CamelSummaryMessageID
enum | CamelMessageFlags
#define | CAMEL_MESSAGE_SYSTEM_MASK

## Object Hierarchy

        GObject
        ╰── CamelMessageInfo
            ├── CamelMessageInfoBase
            ╰── CamelVeeMessageInfo

## Description

## Functions

### camel_message_info_new ()

    CamelMessageInfo *
    camel_message_info_new (struct _CamelFolderSummary *summary);

Create a new CamelMessageInfo object, optionally for given `summary` .

#### Parameters

summary | parent CamelFolderSummary object, or `NULL`. | [nullable][type CamelFolderSummary]

#### Returns

a new CamelMessageInfo object.

[transfer full]

Since: 3.24

### camel_message_info_clone ()

    CamelMessageInfo *
    camel_message_info_clone (const CamelMessageInfo *mi,
                              struct _CamelFolderSummary *assign_summary);

Clones the `mi` as a new CamelMessageInfo and eventually assigns a new CamelFolderSummary to it. If it's not set, then the same summary as the one with `mi` is used.

#### Parameters

mi | a CamelMessageInfo to clone |
assign_summary | parent CamelFolderSummary object, or `NULL`, to set on the clone. | [nullable][type CamelFolderSummary]

#### Returns

a new CamelMessageInfo object, clone of the `mi` .

[transfer full]

Since: 3.24

### camel_message_info_load ()

    gboolean
    camel_message_info_load (CamelMessageInfo *mi,
                             const struct _CamelMIRecord *record,
                             gchar **bdata_ptr);

Load content of `mi` from the data stored in `record` . The `bdata_ptr` points to the current position of the record->bdata, where the read can continue. Use helper functions `camel_util_bdata_get_number()` and `camel_util_bdata_get_string()` to read data from it and also move forward the *bdata_ptr.

After successful load of the `mi` , the 'dirty' flag is unset.

#### Parameters

mi | a CamelMessageInfo to load |
record | a CamelMIRecord to load the `mi` from. | [type CamelMIRecord]
bdata_ptr | a backend specific data (bdata) pointer |

#### Returns

Whether the load was successful.

Since: 3.24

### camel_message_info_save ()

    gboolean
    camel_message_info_save (const CamelMessageInfo *mi,
                             struct _CamelMIRecord *record,
                             GString *bdata_str);

Save the `mi` content to the message info record `record` . It can populate all but the record->bdata value, which is set fro mthe `bdata_str` . Use helper functions `camel_util_bdata_put_number()` and `camel_util_bdata_put_string()` to put data into the `bdata_str` .

#### Parameters

mi | a CamelMessageInfo |
record | a CamelMIRecord to populate. | [type CamelMIRecord]
bdata_str | a GString with a string to save as backend specific data (bdata) |

#### Returns

Whether the save succeeded.

Since: 3.24

### camel_message_info_ref_summary ()

    struct _CamelFolderSummary *
    camel_message_info_ref_summary (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Referenced CamelFolderSummary to which the `mi` belongs, or `NULL`, if there is none. Use `g_object_unref()` for non-NULL returned values when done with it.

[transfer full][nullable]

Since: 3.24

### camel_message_info_property_lock ()

    void
    camel_message_info_property_lock (const CamelMessageInfo *mi);

Acquires a property lock, which is used to ensure thread safety when properties are changing. Release the lock with `camel_message_info_property_unlock()`.

Note: Make sure the CamelFolderSummary lock is held before this lock, if there will be called any 'set' function on the `mi` , to avoid deadlock when the summary would be set as dirty while another thread might try to read values from the `mi` , waiting for the property lock and holding the summary lock at the same time.

#### Parameters

mi | a CamelMessageInfo |

Since: 3.24

### camel_message_info_property_unlock ()

    void
    camel_message_info_property_unlock (const CamelMessageInfo *mi);

Releases a property lock, previously acquired with `camel_message_info_property_lock()`.

#### Parameters

mi | a CamelMessageInfo |

Since: 3.24

### camel_message_info_get_dirty ()

    gboolean
    camel_message_info_get_dirty (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Whether the `mi` is dirty, which means that it had been changed and a save to the local summary is required.

Since: 3.24

### camel_message_info_set_dirty ()

    void
    camel_message_info_set_dirty (CamelMessageInfo *mi,
                                  gboolean dirty);

Marks the `mi` as dirty, which means a save to the local summary is required.

#### Parameters

mi | a CamelMessageInfo |
dirty | a dirty state to set |

Since: 3.24

### camel_message_info_get_folder_flagged ()

    gboolean
    camel_message_info_get_folder_flagged (const CamelMessageInfo *mi);

The folder flagged flag is used to mark the message infor as being changed and this change should be propagated to the remote store (server). This is different from the 'dirty' flag, which is set for local changes only. It can happen that the 'folder-flagged' flag is set, but the 'dirty' flag not.

This is only a convenient wrapper around CAMEL_MESSAGE_FOLDER_FLAGGED flag, for better readiness of the code.

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Whether requires save of the local changes into the remote store.

Since: 3.24

### camel_message_info_set_folder_flagged ()

    gboolean
    camel_message_info_set_folder_flagged (CamelMessageInfo *mi,
                                           gboolean folder_flagged);

Changes the folder-flagged flag to the `folder_flagged` value. See `camel_message_info_get_folder_flagged()` for more information about the use of this flag.

This is only a convenient wrapper around CAMEL_MESSAGE_FOLDER_FLAGGED flag, for better readiness of the code.

#### Parameters

mi | a CamelMessageInfo |
folder_flagged | a value to set to |

#### Returns

Whether the flag had been changed.

Since: 3.24

### camel_message_info_get_folder_flagged_stamp ()

    guint
    camel_message_info_get_folder_flagged_stamp
                                   (const CamelMessageInfo *mi);

The 'folder-flagged-stamp' is a stamp of the 'folder-flagged' flag. This stamp changes whenever anything would mark the `mi` as 'folder-flagged', regardless the `mi` being already 'folder-flagged'. It can be used to recognize changes on the 'folder-flagged' flag during the time.

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Stamp of the 'folder-flagged' flag.

Since: 3.24

### camel_message_info_get_abort_notifications ()

    gboolean
    camel_message_info_get_abort_notifications
                                   (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Whether the `mi` is aborting notifications, which means that it will not influence 'dirty' and 'folder-flagged' flags in the set/take functions, neither it will emit any GObject::notify signals on change, nor associated folder's "changed" signal.

Since: 3.24

### camel_message_info_set_abort_notifications ()

    void
    camel_message_info_set_abort_notifications
                                   (CamelMessageInfo *mi,
                                    gboolean abort_notifications);

Marks the `mi` to abort any notifications, which means that it will not influence 'dirty' and 'folder-flagged' flags in the set/take functions, neither it will emit any GObject::notify signals on change, nor associated folder's "changed" signal.

#### Parameters

mi | a CamelMessageInfo |
abort_notifications | a state to set |

Since: 3.24

### camel_message_info_freeze_notifications ()

    void
    camel_message_info_freeze_notifications
                                   (CamelMessageInfo *mi);

Freezes all the notifications until the `camel_message_info_thaw_notifications()` is called. This function can be called multiple times, where the last thaw will do the notifications.

#### Parameters

mi | a CamelMessageInfo |

Since: 3.24

### camel_message_info_thaw_notifications ()

    void
    camel_message_info_thaw_notifications (CamelMessageInfo *mi);

Reverses the call of the `camel_message_info_freeze_notifications()`. If this is the last freeze, then the associated folder is also notified about the change, if any happened during the freeze.

#### Parameters

mi | a CamelMessageInfo |

Since: 3.24

### camel_message_info_get_notifications_frozen ()

    gboolean
    camel_message_info_get_notifications_frozen
                                   (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Whether the notifications are frozen.

See: `camel_message_info_freeze_notifications()`

Since: 3.24

### camel_message_info_get_uid ()

    const gchar *
    camel_message_info_get_uid (const CamelMessageInfo *mi);

Get the UID of the mi.

#### Parameters

mi | a CamelMessageInfo |

#### Returns

The UID of the `mi` .

[transfer none]

Since: 3.24

### camel_message_info_pooldup_uid ()

    const gchar *
    camel_message_info_pooldup_uid (const CamelMessageInfo *mi);

Get the UID of the mi, duplicated on the Camel's string pool. This is good for thread safety, though the UID should not change once set.

#### Parameters

mi | a CamelMessageInfo |

#### Returns

A newly references string in the string pool, the mi UID. Free it with `camel_pstring_free()` when no longer needed.

Since: 3.24

### camel_message_info_set_uid ()

    gboolean
    camel_message_info_set_uid (CamelMessageInfo *mi,
                                const gchar *uid);

Changes UID of the `mi` to `uid` . If it changes, the 'dirty' flag of the `mi` is set too, unless the `mi` is aborting notifications. This change does not influence the 'folder-flagged' flag.

#### Parameters

mi | a CamelMessageInfo |
uid | a UID to set |

#### Returns

Whether the UID changed.

Since: 3.24

### camel_message_info_get_flags ()

    guint32
    camel_message_info_get_flags (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Bit-or of CamelMessageFlags set on the `mi` .

Since: 3.24

### camel_message_info_set_flags ()

    gboolean
    camel_message_info_set_flags (CamelMessageInfo *mi,
                                  guint32 mask,
                                  guint32 set);

Change the state of the flags on the `mi` . Both `mask` and `set` are bit-or of CamelMessageFlags.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is also emitted folder's "changed" signal for this `mi` , if necessary. In case the CAMEL_MESSAGE_FOLDER_FLAGGED flag would be set and the `mi` is not aborting notifications, the 'folder-flagged-stamp' changes too.

#### Parameters

mi | a CamelMessageInfo |
mask | mask of flags to change |
set | state the flags should be changed to |

#### Returns

Whether the flags changed.

Since: 3.24

### camel_message_info_get_user_flag ()

    gboolean
    camel_message_info_get_user_flag (const CamelMessageInfo *mi,
                                      const gchar *name);

#### Parameters

mi | a CamelMessageInfo |
name | user flag name |

#### Returns

Whther the user flag named `name` is set.

Since: 3.24

### camel_message_info_set_user_flag ()

    gboolean
    camel_message_info_set_user_flag (CamelMessageInfo *mi,
                                      const gchar *name,
                                      gboolean state);

Change `state` of the flag named `name` . Unlike user tags, user flags can only be set or unset, while the user tags can contain certain values.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is also emitted folder's "changed" signal for this `mi` , if necessary.

#### Parameters

mi | a CamelMessageInfo |
name | user flag name |
state | state to set for the flag |

#### Returns

Whether the message info changed.

Since: 3.24

### camel_message_info_get_user_flags ()

    const CamelNamedFlags *
    camel_message_info_get_user_flags (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

A CamelNamedFlags with all the currently set user flags on the `mi` . Do not modify it.

[transfer none][nullable]

Since: 3.24

### camel_message_info_dup_user_flags ()

    CamelNamedFlags *
    camel_message_info_dup_user_flags (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

A newly allocated CamelNamedFlags with all the currently set user flags on the `mi` . Free the returned structure with `camel_named_flags_free()` when no londer needed.

[transfer full][nullable]

Since: 3.24

### camel_message_info_take_user_flags ()

    gboolean
    camel_message_info_take_user_flags (CamelMessageInfo *mi,
                                        CamelNamedFlags *user_flags);

Takes all the `user_flags` , which replaces any current user flags on the `mi` . The passed-in `user_flags` is consumed by the `mi` , which becomes an owner of it. The caller should not change `user_flags` afterwards.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is also emitted folder's "changed" signal for this `mi` , if necessary.

Note that it's not safe to use the `user_flags` after the call to this function, because it can be freed due to no change.

#### Parameters

mi | a CamelMessageInfo |
user_flags | user flags to set. | [transfer full][nullable]

#### Returns

Whether the message info changed.

Since: 3.24

### camel_message_info_get_user_tag ()

    const gchar *
    camel_message_info_get_user_tag (const CamelMessageInfo *mi,
                                     const gchar *name);

#### Parameters

mi | a CamelMessageInfo |
name | user tag name |

#### Returns

Value of the user tag, or `NULL` when it is not set.

[transfer none][nullable]

Since: 3.24

### camel_message_info_dup_user_tag ()

    gchar *
    camel_message_info_dup_user_tag (const CamelMessageInfo *mi,
                                     const gchar *name);

#### Parameters

mi | a CamelMessageInfo |
name | user tag name |

#### Returns

Value of the user tag as newly allocated string, or `NULL` when it is not set. Free it with `g_free()` when no longer needed.

[transfer full][nullable]

Since: 3.24

### camel_message_info_set_user_tag ()

    gboolean
    camel_message_info_set_user_tag (CamelMessageInfo *mi,
                                     const gchar *name,
                                     const gchar *value);

Set user tag `name` to `value` , or remove it, if `value` is `NULL`.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is also emitted folder's "changed" signal for this `mi` , if necessary.

#### Parameters

mi | a CamelMessageInfo |
name | user tag name |
value | user tag value, or `NULL` to remove the user tag. | [nullable]

#### Returns

Whether the `mi` changed.

Since: 3.24

### camel_message_info_get_user_tags ()

    const CamelNameValueArray *
    camel_message_info_get_user_tags (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

a CamelNameValueArray containing all set user tags of the `mi` . Do not modify it.

[transfer none][nullable]

Since: 3.24

### camel_message_info_dup_user_tags ()

    CamelNameValueArray *
    camel_message_info_dup_user_tags (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

a newly allocated CamelNameValueArray containing all set user tags of the `mi` . Free it with `camel_name_value_array_free()` when no longer needed.

[transfer full][nullable]

Since: 3.24

### camel_message_info_take_user_tags ()

    gboolean
    camel_message_info_take_user_tags (CamelMessageInfo *mi,
                                       CamelNameValueArray *user_tags);

Takes all the `user_tags` , which replaces any current user tags on the `mi` . The passed-in `user_tags` is consumed by the `mi` , which becomes an owner of it. The caller should not change `user_tags` afterwards.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is also emitted folder's "changed" signal for this `mi` , if necessary.

Note that it's not safe to use the `user_tags` after the call to this function, because it can be freed due to no change.

#### Parameters

mi | a CamelMessageInfo |
user_tags | user tags to set. | [transfer full][nullable]

#### Returns

Whether the `mi` changed.

Since: 3.24

### camel_message_info_get_subject ()

    const gchar *
    camel_message_info_get_subject (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Subject of the mi.

[transfer none]

Since: 3.24

### camel_message_info_set_subject ()

    gboolean
    camel_message_info_set_subject (CamelMessageInfo *mi,
                                    const gchar *subject);

Sets Subject from the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
subject | a Subject to set. | [nullable]

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_from ()

    const gchar *
    camel_message_info_get_from (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

From address of the `mi` .

[transfer none]

Since: 3.24

### camel_message_info_set_from ()

    gboolean
    camel_message_info_set_from (CamelMessageInfo *mi,
                                 const gchar *from);

Sets From from the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
from | a From to set. | [nullable]

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_to ()

    const gchar *
    camel_message_info_get_to (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

To address of the `mi` .

[transfer none]

Since: 3.24

### camel_message_info_set_to ()

    gboolean
    camel_message_info_set_to (CamelMessageInfo *mi,
                               const gchar *to);

Sets To from the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
to | a To to set. | [nullable]

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_cc ()

    const gchar *
    camel_message_info_get_cc (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

CC address of the `mi` .

[transfer none]

Since: 3.24

### camel_message_info_set_cc ()

    gboolean
    camel_message_info_set_cc (CamelMessageInfo *mi,
                               const gchar *cc);

Sets CC from the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
cc | a CC to set. | [nullable]

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_mlist ()

    const gchar *
    camel_message_info_get_mlist (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Mailing list address of the `mi` .

[transfer none]

Since: 3.24

### camel_message_info_set_mlist ()

    gboolean
    camel_message_info_set_mlist (CamelMessageInfo *mi,
                                  const gchar *mlist);

Sets mesage list address from the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
mlist | a message list address to set. | [nullable]

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_size ()

    guint32
    camel_message_info_get_size (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Size of the associated message.

Since: 3.24

### camel_message_info_set_size ()

    gboolean
    camel_message_info_set_size (CamelMessageInfo *mi,
                                 guint32 size);

Sets size of the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
size | a size to set |

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_date_sent ()

    gint64
    camel_message_info_get_date_sent (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

time_t of the Date header of the message, encoded as gint64.

Since: 3.24

### camel_message_info_set_date_sent ()

    gboolean
    camel_message_info_set_date_sent (CamelMessageInfo *mi,
                                      gint64 date_sent);

Sets sent date (the Date header) of the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
date_sent | a sent date to set |

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_date_received ()

    gint64
    camel_message_info_get_date_received (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

time_t of the Received header of the message, encoded as gint64.

Since: 3.24

### camel_message_info_set_date_received ()

    gboolean
    camel_message_info_set_date_received (CamelMessageInfo *mi,
                                          gint64 date_received);

Sets received date (the Received header) of the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
date_received | a received date to set |

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_message_id ()

    guint64
    camel_message_info_get_message_id (const CamelMessageInfo *mi);

Encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to CamelSummaryMessageID.

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Partial MD5 hash of the Message-ID header of the associated message.

Since: 3.24

### camel_message_info_set_message_id ()

    gboolean
    camel_message_info_set_message_id (CamelMessageInfo *mi,
                                       guint64 message_id);

Sets encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to CamelSummaryMessageID.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
message_id | a message id to set |

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_references ()

    const GArray *
    camel_message_info_get_references (const CamelMessageInfo *mi);

Gets encoded In-Reply-To and References headers of the associated message as an array of guint64 numbers, partial MD5 sums. Each value can be cast to CamelSummaryMessageID.

#### Parameters

mi | a CamelMessageInfo |

#### Returns

A GArray of guint64 encoded Message-ID-s; or `NULL` when none are available.

[transfer none][nullable][element-type guint64]

Since: 3.24

### camel_message_info_dup_references ()

    GArray *
    camel_message_info_dup_references (const CamelMessageInfo *mi);

Duplicates encoded In-Reply-To and References headers of the associated message as an array of guint64 numbers, partial MD5 sums. Each value can be cast to CamelSummaryMessageID.

#### Parameters

mi | a CamelMessageInfo |

#### Returns

A GArray of guint64 encoded Message-ID-s; or `NULL` when none are available. Free returned array with `g_array_unref()` when no longer needed.

[transfer full][nullable][element-type guint64]

Since: 3.24

### camel_message_info_take_references ()

    gboolean
    camel_message_info_take_references (CamelMessageInfo *mi,
                                        GArray *references);

Takes encoded In-Reply-To and References headers of the associated message as an array of guint64 numbers, partial MD5 sums. Each value can be cast to CamelSummaryMessageID.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

Note that it's not safe to use the `references` after the call to this function, because it can be freed due to no change.

#### Parameters

mi | a CamelMessageInfo |
references | a references to set. | [element-type guint64][transfer full][nullable]

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_headers ()

    const CamelNameValueArray *
    camel_message_info_get_headers (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

All the message headers of the associated message, or `NULL`, when none are available.

[transfer none][nullable]

Since: 3.24

### camel_message_info_dup_headers ()

    CamelNameValueArray *
    camel_message_info_dup_headers (const CamelMessageInfo *mi);

Duplicates array of headers for the `mi` .

#### Parameters

mi | a CamelMessageInfo |

#### Returns

All the message headers of the associated message, or `NULL`, when none are available. Free returned array with `camel_name_value_array_free()` when no longer needed.

[transfer full][nullable]

Since: 3.24

### camel_message_info_take_headers ()

    gboolean
    camel_message_info_take_headers (CamelMessageInfo *mi,
                                     CamelNameValueArray *headers);

Takes headers of the associated message.

This property is considered static, in a meaning that it should not change during the life-time of the `mi` , the same as it doesn't change in the associated message.

If the `mi` changed, the 'dirty' flag and the 'folder-flagged' flag are set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

Note that it's not safe to use the `headers` after the call to this function, because it can be freed due to no change.

#### Parameters

mi | a CamelMessageInfo |
headers | headers to set, as CamelNameValueArray, or `NULL`. | [transfer full][nullable]

#### Returns

Whether the value changed.

Since: 3.24

### camel_message_info_get_user_header ()

    const gchar *
    camel_message_info_get_user_header (const CamelMessageInfo *mi,
                                        const gchar *name);

#### Parameters

mi | a CamelMessageInfo |
name | header name |

#### Returns

Value of the header named `name` from the user-defined message headers of the associated message, or `NULL`, when not available.

[transfer none][nullable]

Since: 3.42

### camel_message_info_dup_user_header ()

    gchar *
    camel_message_info_dup_user_header (const CamelMessageInfo *mi,
                                        const gchar *name);

#### Parameters

mi | a CamelMessageInfo |
name | header name |

#### Returns

Value of the header named `name` from the user-defined message headers of the associated message, or `NULL`, when not available. Free the returned string with `g_free()`, when no longer needed.

[transfer full][nullable]

Since: 3.42

### camel_message_info_set_user_header ()

    gboolean
    camel_message_info_set_user_header (CamelMessageInfo *mi,
                                        const gchar *name,
                                        const gchar *value);

Set `value` for a single user-defined message header of the associated message. When the `value` is `NULL`, the header `name` is removed from the user-defined headers.

If the `mi` changed, the 'dirty' flag is set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
name | header name |
value | header value, or `NULL`. | [nullable]

#### Returns

Whether the value changed.

Since: 3.42

### camel_message_info_get_user_headers ()

    const CamelNameValueArray *
    camel_message_info_get_user_headers (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

All the user-defined message headers of the associated message, or `NULL`, when none are available.

[transfer none][nullable]

Since: 3.42

### camel_message_info_dup_user_headers ()

    CamelNameValueArray *
    camel_message_info_dup_user_headers (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

All the user-defined message headers of the associated message, or `NULL`, when none are available. Free returned array with `camel_name_value_array_free()` when no longer needed.

[transfer full][nullable]

Since: 3.42

### camel_message_info_take_user_headers ()

    gboolean
    camel_message_info_take_user_headers (CamelMessageInfo *mi,
                                          CamelNameValueArray *headers);

Takes user-defined message headers of the associated message.

If the `mi` changed, the 'dirty' flag is set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

Note that it's not safe to use the `headers` after the call to this function, because it can be freed due to no change.

#### Parameters

mi | a CamelMessageInfo |
headers | headers to set, as CamelNameValueArray, or `NULL`. | [transfer full][nullable]

#### Returns

Whether the value changed.

Since: 3.42

### camel_message_info_get_preview ()

    const gchar *
    camel_message_info_get_preview (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Body preview of the associated message, or `NULL`, when not available.

[transfer none][nullable]

Since: 3.42

### camel_message_info_dup_preview ()

    gchar *
    camel_message_info_dup_preview (const CamelMessageInfo *mi);

#### Parameters

mi | a CamelMessageInfo |

#### Returns

Body preview of the associated message, or `NULL`, when not available. Free the returned string with `g_free()`, when no longer needed.

[transfer none][nullable]

Since: 3.42

### camel_message_info_set_preview ()

    gboolean
    camel_message_info_set_preview (CamelMessageInfo *mi,
                                    const gchar *preview);

Set `preview` as the body preview of the associated message. Use `NULL` or an empty string to unset the value.

If the `mi` changed, the 'dirty' flag is set automatically, unless the `mi` is aborting notifications. There is not emitted folder's "changed" signal for this `mi` .

#### Parameters

mi | a CamelMessageInfo |
preview | message body preview, or `NULL`. | [nullable]

#### Returns

Whether the value changed.

Since: 3.42

### camel_message_info_dump ()

    void
    camel_message_info_dump (CamelMessageInfo *mi);

Dumps the mesasge info `mi` to stdout. This is meand for debugging purposes only.

#### Parameters

mi | a CamelMessageInfo |

Since: 3.24

## Types and Values

### CamelSummaryMessageID

    typedef struct {
    	union {
    		guint64 id;
    		guchar hash[8];
    		struct {
    			guint32 hi;
    			guint32 lo;
    		} part;
    	} id;
    } CamelSummaryMessageID;

### enum CamelMessageFlags

#### Members

CAMEL_MESSAGE_ANSWERED |  |
CAMEL_MESSAGE_DELETED |  |
CAMEL_MESSAGE_DRAFT |  |
CAMEL_MESSAGE_FLAGGED |  |
CAMEL_MESSAGE_SEEN |  |
CAMEL_MESSAGE_ATTACHMENTS |  |
CAMEL_MESSAGE_ANSWERED_ALL |  |
CAMEL_MESSAGE_JUNK |  |
CAMEL_MESSAGE_SECURE |  |
CAMEL_MESSAGE_NOTJUNK |  |
CAMEL_MESSAGE_FORWARDED |  |
CAMEL_MESSAGE_FOLDER_FLAGGED |  |
CAMEL_MESSAGE_JUNK_LEARN |  |
CAMEL_MESSAGE_USER |  |

### CAMEL_MESSAGE_SYSTEM_MASK

    #define CAMEL_MESSAGE_SYSTEM_MASK (0xffff << 16)

## Property Details

### The `“abort-notifications”` property

      “abort-notifications”      gboolean

Flag, whether the info is currently aborting notifications. It is used to avoid unnecessary 'folder-flagged' and 'dirty' flags changes and also to avoid associated folder's "changed" signal. f

Owner: CamelMessageInfo

Flags: Read / Write

Default value: FALSE

Since: 3.24

### The `“cc”` property

      “cc”                       char *

CC address of the associated message.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: NULL

Since: 3.24

### The `“date-received”` property

      “date-received”            gint64

Received date of the associated message.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: 0

Since: 3.24

### The `“date-sent”` property

      “date-sent”                gint64

Sent Date of the associated message.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: 0

Since: 3.24

### The `“dirty”` property

      “dirty”                    gboolean

Flag, whether the info is changed and requires save to disk. Compare with CamelMessageInfo:folder-flagged

Owner: CamelMessageInfo

Flags: Read / Write

Default value: FALSE

Since: 3.24

### The `“flags”` property

      “flags”                    CamelMessageFlags

Bit-or of CamelMessageFlags.

Owner: CamelMessageInfo

Flags: Read / Write

Since: 3.24

### The `“folder-flagged”` property

      “folder-flagged”           gboolean

Flag, whether the info is changed and requires save to the destination store/server. This is different from the CamelMessageInfo:dirty, which takes care of the local information only.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: FALSE

Since: 3.24

### The `“folder-flagged-stamp”` property

      “folder-flagged-stamp”     guint

The 'folder-flagged-stamp' is a stamp of the 'folder-flagged' flag. This stamp changes whenever anything would mark the `mi` 'folder-flagged', regardless the `mi` being already 'folder-flagged'. It can be used to recognize changes on the 'folder-flagged' flag during the time.

Owner: CamelMessageInfo

Flags: Read

Default value: 0

Since: 3.24

### The `“from”` property

      “from”                     char *

From address of the associated message.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: NULL

Since: 3.24

### The `“headers”` property

      “headers”                  CamelNameValueArray *

Headers of the associated message. Can be `NULL`.

Owner: CamelMessageInfo

Flags: Read / Write

Since: 3.24

### The `“message-id”` property

      “message-id”               guint64

Encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to CamelSummaryMessageID.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: 0

Since: 3.24

### The `“mlist”` property

      “mlist”                    char *

Mailing list address of the associated message.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: NULL

Since: 3.24

### The `“preview”` property

      “preview”                  char *

Body preview of the associated message. Can be `NULL`.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: NULL

Since: 3.42

### The `“references”` property

      “references”               GArray *

Encoded In-Reply-To and References headers of the associated message as an array of guint64 numbers, partial MD5 sums. Each value can be cast to CamelSummaryMessageID.

Owner: CamelMessageInfo

Flags: Read / Write

Since: 3.24

### The `“size”` property

      “size”                     guint

Size of the associated message.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: 0

Since: 3.24

### The `“subject”` property

      “subject”                  char *

Subject of the associated message.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: NULL

Since: 3.24

### The `“summary”` property

      “summary”                  CamelFolderSummary *

The CamelFolderSummary to which the message info belongs, or `NULL`. It can be set only during construction of the object.

Owner: CamelMessageInfo

Flags: Read / Write / Construct Only

Since: 3.24

### The `“to”` property

      “to”                       char *

To address of the associated message.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: NULL

Since: 3.24

### The `“uid”` property

      “uid”                      char *

A unique ID of the message in its folder.

Owner: CamelMessageInfo

Flags: Read / Write

Default value: NULL

Since: 3.24

### The `“user-flags”` property

      “user-flags”               CamelNamedFlags *

User flags for the associated message. Can be `NULL`. Unlike user-tags, which can contain various values, the user-flags can only be set or not.

Owner: CamelMessageInfo

Flags: Read / Write

Since: 3.24

### The `“user-headers”` property

      “user-headers”             CamelNameValueArray *

User-defined headers of the associated message. Can be `NULL`.

Owner: CamelMessageInfo

Flags: Read / Write

Since: 3.42

### The `“user-tags”` property

      “user-tags”                CamelNameValueArray *

User tags for the associated message. Can be `NULL`. Unlike user-flags, which can be set or not, the user-tags can contain various values.

Owner: CamelMessageInfo

Flags: Read / Write

Since: 3.24