### Method

# EDataServer SourceRegistry ref_default_mail_identity

since: 3.6

#### Declaration [src]

    ESource*
    e_source_registry_ref_default_mail_identity (
      ESourceRegistry* registry
    )

#### Description [src]

Returns the `ESource` most recently passed to `e_source_registry_set_default_mail_identity()` either in this session or a previous session, or else falls back to the mail identity named by the default mail account. If even that fails it returns any mail identity from `registry`, or `NULL` if there are none.

The returned `ESource` is referenced for thread-safety and must be unreferenced with `g_object_unref()` when finished with it.

Available since: 3.6

#### Return value

Type: `ESource`

The default mail identity `ESource`, or `NULL`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.