ESourceMailAccount: Evolution-Data-Server Reference Manual

## ESourceMailAccount ESourceMailAccount — ESource extension for an email account |

## Functions

const gchar * | e_source_mail_account_get_identity_uid ()
gchar * | e_source_mail_account_dup_identity_uid ()
void | e_source_mail_account_set_identity_uid ()
const gchar * | e_source_mail_account_get_archive_folder ()
gchar * | e_source_mail_account_dup_archive_folder ()
void | e_source_mail_account_set_archive_folder ()
gboolean | e_source_mail_account_get_needs_initial_setup ()
void | e_source_mail_account_set_needs_initial_setup ()
EThreeState | e_source_mail_account_get_mark_seen ()
void | e_source_mail_account_set_mark_seen ()
gint | e_source_mail_account_get_mark_seen_timeout ()
void | e_source_mail_account_set_mark_seen_timeout ()
gboolean | e_source_mail_account_get_builtin ()
void | e_source_mail_account_set_builtin ()

## Types and Values

#define | E_SOURCE_EXTENSION_MAIL_ACCOUNT
struct | ESourceMailAccount

## Object Hierarchy

        GObject
        ╰── ESourceExtension
            ╰── ESourceBackend
                ╰── ESourceMailAccount

## Includes

    #include <libedataserver/libedataserver.h>

## Description

The ESourceMailAccount extension identifies the ESource as a mail account and also links to a default "mail identity" to use. See ESourceMailIdentity for more information about identities.

Access the extension as follows:

    1
    2
    3
    4
    5
    #include <libedataserver/libedataserver.h>

    ESourceMailAccount *extension;

    extension = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_ACCOUNT);

## Functions

### e_source_mail_account_get_identity_uid ()

    const gchar *
    e_source_mail_account_get_identity_uid
                                   (ESourceMailAccount *extension);

Returns the “uid” of the ESource that describes the mail identity to be used for this account.

#### Parameters

extension | an ESourceMailAccount |

#### Returns

the mail identity “uid”.

[nullable]

Since: 3.6

### e_source_mail_account_dup_identity_uid ()

    gchar *
    e_source_mail_account_dup_identity_uid
                                   (ESourceMailAccount *extension);

Thread-safe variation of `e_source_mail_account_get_identity_uid()`. Use this function when accessing `extension` from multiple threads.

The returned string should be freed with `g_free()` when no longer needed.

#### Parameters

extension | an ESourceMailAccount |

#### Returns

a newly-allocated copy of “identity-uid”.

[nullable]

Since: 3.6

### e_source_mail_account_set_identity_uid ()

    void
    e_source_mail_account_set_identity_uid
                                   (ESourceMailAccount *extension,
                                    const gchar *identity_uid);

Sets the “uid” of the ESource that describes the mail identity to be used for this account.

#### Parameters

extension | an ESourceMailAccount |
identity_uid | the mail identity “uid”, or `NULL`. | [nullable]

Since: 3.6

### e_source_mail_account_get_archive_folder ()

    const gchar *
    e_source_mail_account_get_archive_folder
                                   (ESourceMailAccount *extension);

Returns a string identifying the archive folder. The format of the identifier string is defined by the client application.

#### Parameters

extension | an ESourceMailAccount |

#### Returns

an identifier of the archive folder.

[nullable]

Since: 3.16

### e_source_mail_account_dup_archive_folder ()

    gchar *
    e_source_mail_account_dup_archive_folder
                                   (ESourceMailAccount *extension);

Thread-safe variation of `e_source_mail_account_get_archive_folder()`. Use this function when accessing `extension` from multiple threads.

The returned string should be freed with `g_free()` when no longer needed.

#### Parameters

extension | an ESourceMailAccount |

#### Returns

a newly-allocated copy of “archive-folder”.

[nullable]

Since: 3.16

### e_source_mail_account_set_archive_folder ()

    void
    e_source_mail_account_set_archive_folder
                                   (ESourceMailAccount *extension,
                                    const gchar *archive_folder);

Sets the folder for sent messages by an identifier string. The format of the identifier string is defined by the client application.

The internal copy of `archive_folder` is automatically stripped of leading and trailing whitespace. If the resulting string is empty, `NULL` is set instead.

#### Parameters

extension | an ESourceMailAccount |
archive_folder | an identifier for the archive folder, or `NULL`. | [nullable]

Since: 3.16

### e_source_mail_account_get_needs_initial_setup ()

    gboolean
    e_source_mail_account_get_needs_initial_setup
                                   (ESourceMailAccount *extension);

Check whether the mail account needs to do its initial setup.

#### Parameters

extension | an ESourceMailAccount |

#### Returns

`TRUE`, when the account needs to run its initial setup

Since: 3.20

### e_source_mail_account_set_needs_initial_setup ()

    void
    e_source_mail_account_set_needs_initial_setup
                                   (ESourceMailAccount *extension,
                                    gboolean needs_initial_setup);

Sets whether the account needs to run its initial setup.

#### Parameters

extension | an ESourceMailAccount |
needs_initial_setup | value to set |

Since: 3.20

### e_source_mail_account_get_mark_seen ()

    EThreeState
    e_source_mail_account_get_mark_seen (ESourceMailAccount *extension);

#### Parameters

extension | an ESourceMailAccount |

#### Returns

an EThreeState, whether messages in this account should be marked as seen automatically.

Since: 3.32

### e_source_mail_account_set_mark_seen ()

    void
    e_source_mail_account_set_mark_seen (ESourceMailAccount *extension,
                                         EThreeState mark_seen);

Sets whether the messages in this account should be marked as seen automatically. An inconsistent state means to use global option.

#### Parameters

extension | an ESourceMailAccount |
mark_seen | an EThreeState as the value to set |

Since: 3.32

### e_source_mail_account_get_mark_seen_timeout ()

    gint
    e_source_mail_account_get_mark_seen_timeout
                                   (ESourceMailAccount *extension);

#### Parameters

extension | an ESourceMailAccount |

#### Returns

timeout in milliseconds for marking messages as seen in this account

Since: 3.32

### e_source_mail_account_set_mark_seen_timeout ()

    void
    e_source_mail_account_set_mark_seen_timeout
                                   (ESourceMailAccount *extension,
                                    gint timeout);

Sets the `timeout` in milliseconds for marking messages as seen in this account. Whether the timeout is used depends on `e_source_mail_account_get_mark_seen()`.

#### Parameters

extension | an ESourceMailAccount |
timeout | a timeout in milliseconds |

Since: 3.32

### e_source_mail_account_get_builtin ()

    gboolean
    e_source_mail_account_get_builtin (ESourceMailAccount *extension);

Returns whether the mail account is a builtin account. The builtin account cannot be created by a user. The default value is `FALSE`.

#### Parameters

extension | an ESourceMailAccount |

#### Returns

`TRUE`, when the account is a builtin account

Since: 3.46

### e_source_mail_account_set_builtin ()

    void
    e_source_mail_account_set_builtin (ESourceMailAccount *extension,
                                       gint builtin);

Sets whether the account is a builtin account. See `e_source_mail_account_get_builtin()` for more information about what it means.

#### Parameters

extension | an ESourceMailAccount |
builtin | value to set |

Since: 3.46

## Types and Values

### E_SOURCE_EXTENSION_MAIL_ACCOUNT

    #define E_SOURCE_EXTENSION_MAIL_ACCOUNT "Mail Account"

Pass this extension name to `e_source_get_extension()` to access ESourceMailAccount. This is also used as a group name in key files.

Since: 3.6

### struct ESourceMailAccount

    struct ESourceMailAccount;

Since: 3.6