### Virtual Method

# Camel MessageInfo take_headers

since: 3.24

#### Declaration [src]

    gboolean
    take_headers (
      CamelMessageInfo* mi,
      CamelNameValueArray* headers
    )

#### Description [src]

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.

Available since: 3.24

#### Parameters

`headers`

  Type: `CamelNameValueArray`

  Headers to set, as `CamelNameValueArray`, or `NULL`.

  The argument can be `NULL`.
  The instance takes ownership of the data, and is responsible for freeing it.

#### Return value

Type: `gboolean`

Whether the value changed.