### Virtual Method

# Camel MessageInfo set_user_flag

since: 3.24

#### Declaration [src]

    gboolean
    set_user_flag (
      CamelMessageInfo* mi,
      const gchar* name,
      gboolean state
    )

#### Description [src]

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.

Available since: 3.24

#### Parameters

`name`

  Type: `const gchar*`

  User flag name.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`state`

  Type: `gboolean`

  State to set for the flag.

#### Return value

Type: `gboolean`

Whether the message info changed.