## Miscellaneous Utilities

Miscellaneous Utilities

## Synopsis

    gboolean            em_utils_folder_is_drafts           (ESourceRegistry *registry,
                                                             CamelFolder *folder);
    gboolean            em_utils_folder_is_templates        (ESourceRegistry *registry,
                                                             CamelFolder *folder);
    gboolean            em_utils_folder_is_sent             (ESourceRegistry *registry,
                                                             CamelFolder *folder);
    gboolean            em_utils_folder_is_outbox           (ESourceRegistry *registry,
                                                             CamelFolder *folder);
    ESource *           em_utils_guess_mail_account         (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid);
    ESource *           em_utils_guess_mail_identity        (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid);
    ESource *           em_utils_guess_mail_account_with_recipients
                                                            (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid);
    ESource *           em_utils_guess_mail_identity_with_recipients
                                                            (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid);
    void                (*EMailUtilsSortSourcesFunc)        (GList **psources,
                                                             gpointer user_data);
    ESource *           em_utils_guess_mail_account_with_recipients_and_sort
                                                            (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid,
                                                             EMailUtilsSortSourcesFunc sort_func,
                                                             gpointer sort_func_data);
    ESource *           em_utils_guess_mail_identity_with_recipients_and_sort
                                                            (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid,
                                                             EMailUtilsSortSourcesFunc sort_func,
                                                             gpointer sort_func_data);
    ESource *           em_utils_ref_mail_identity_for_store
                                                            (ESourceRegistry *registry,
                                                             CamelStore *store);
    gboolean            em_utils_is_local_delivery_mbox_file
                                                            (CamelService *service);
    void                em_utils_expand_groups              (CamelInternetAddress *addresses);

## Description

## Details

### em_utils_folder_is_drafts ()

    gboolean            em_utils_folder_is_drafts           (ESourceRegistry *registry,
                                                             CamelFolder *folder);

Decides if `folder` is a Drafts folder.

`registry` : | an ESourceRegistry
`folder` : | a CamelFolder
Returns : | `TRUE` if this is a Drafts folder or `FALSE` otherwise.

### em_utils_folder_is_templates ()

    gboolean            em_utils_folder_is_templates        (ESourceRegistry *registry,
                                                             CamelFolder *folder);

Decides if `folder` is a Templates folder.

`registry` : | an ESourceRegistry
`folder` : | a CamelFolder
Returns : | `TRUE` if this is a Templates folder or `FALSE` otherwise.

### em_utils_folder_is_sent ()

    gboolean            em_utils_folder_is_sent             (ESourceRegistry *registry,
                                                             CamelFolder *folder);

Decides if `folder` is a Sent folder.

`registry` : | an ESourceRegistry
`folder` : | a CamelFolder
Returns : | `TRUE` if this is a Sent folder or `FALSE` otherwise.

### em_utils_folder_is_outbox ()

    gboolean            em_utils_folder_is_outbox           (ESourceRegistry *registry,
                                                             CamelFolder *folder);

Decides if `folder` is an Outbox folder.

`registry` : | an ESourceRegistry
`folder` : | a CamelFolder
Returns : | `TRUE` if this is an Outbox folder or `FALSE` otherwise.

### em_utils_guess_mail_account ()

    ESource *           em_utils_guess_mail_account         (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid);

### em_utils_guess_mail_identity ()

    ESource *           em_utils_guess_mail_identity        (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid);

### em_utils_guess_mail_account_with_recipients ()

    ESource *           em_utils_guess_mail_account_with_recipients
                                                            (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid);

### em_utils_guess_mail_identity_with_recipients ()

    ESource *           em_utils_guess_mail_identity_with_recipients
                                                            (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid);

### EMailUtilsSortSourcesFunc ()

    void                (*EMailUtilsSortSourcesFunc)        (GList **psources,
                                                             gpointer user_data);

### em_utils_guess_mail_account_with_recipients_and_sort ()

    ESource *           em_utils_guess_mail_account_with_recipients_and_sort
                                                            (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid,
                                                             EMailUtilsSortSourcesFunc sort_func,
                                                             gpointer sort_func_data);

### em_utils_guess_mail_identity_with_recipients_and_sort ()

    ESource *           em_utils_guess_mail_identity_with_recipients_and_sort
                                                            (ESourceRegistry *registry,
                                                             CamelMimeMessage *message,
                                                             CamelFolder *folder,
                                                             const gchar *message_uid,
                                                             EMailUtilsSortSourcesFunc sort_func,
                                                             gpointer sort_func_data);

### em_utils_ref_mail_identity_for_store ()

    ESource *           em_utils_ref_mail_identity_for_store
                                                            (ESourceRegistry *registry,
                                                             CamelStore *store);

### em_utils_is_local_delivery_mbox_file ()

    gboolean            em_utils_is_local_delivery_mbox_file
                                                            (CamelService *service);

Returns whether `service` refers to a local mbox file where new mail is delivered by some external software.

Specifically that means `service`'s CamelProvider protocol is "mbox" and its "path" setting points to an existing file, not a directory.

`service` : | a CamelService
Returns : | whether `service` is for local mbox delivery

### em_utils_expand_groups ()

    void                em_utils_expand_groups              (CamelInternetAddress *addresses);