e-mail-part-utils: Evolution Mail Formatter Reference Manual

## e-mail-part-utils e-mail-part-utils |

## Functions

gboolean | e_mail_part_is_secured ()
const gchar * | e_mail_part_get_frame_security_style ()
const gchar * | e_mail_part_snoop_type ()
gboolean | e_mail_part_is_attachment ()
void | e_mail_part_preserve_charset_in_content_type ()
CamelMimePart * | e_mail_part_get_related_display_part ()
void | e_mail_part_animation_extract_frame ()
gchar * | e_mail_part_build_uri ()
gchar * | e_mail_part_describe ()
gboolean | e_mail_part_is_inline ()
gboolean | e_mail_part_utils_body_refers ()

## Description

## Functions

### e_mail_part_is_secured ()

    gboolean
    e_mail_part_is_secured (CamelMimePart *part);

Whether `part` is signed or encrypted or not.

#### Parameters

part | a CamelMimePart |

#### Returns

TRUE/FALSE

### e_mail_part_get_frame_security_style ()

    const gchar *
    e_mail_part_get_frame_security_style (EMailPart *part);

### e_mail_part_snoop_type ()

    const gchar *
    e_mail_part_snoop_type (CamelMimePart *part);

Tries to snoop the mime type of a part.

#### Parameters

part | a CamelMimePart |

#### Returns

`NULL` if unknown (more likely application/octet-stream).

### e_mail_part_is_attachment ()

    gboolean
    e_mail_part_is_attachment (CamelMimePart *part);

Returns true if the part is an attachment.

A part is not considered an attachment if it is a multipart, or a text part with no filename. It is used to determine if an attachment header should be displayed for the part.

Content-Disposition is not checked.

#### Parameters

part | Part to check. |

#### Returns

TRUE/FALSE

### e_mail_part_preserve_charset_in_content_type ()

    void
    e_mail_part_preserve_charset_in_content_type
                                   (CamelMimePart *ipart,
                                    CamelMimePart *opart);

Copies 'charset' part of content-type header from `ipart` to `opart` .

#### Parameters

ipart | Source CamelMimePart |
opart | Target CamelMimePart |

### e_mail_part_get_related_display_part ()

    CamelMimePart *
    e_mail_part_get_related_display_part (CamelMimePart *part,
                                          gint *out_displayid);

Goes through all subparts of given `part` and tries to determine which part should be displayed and which parts are just attachments to the part.

#### Parameters

part | a multipart/related or multipart/alternative CamelMimePart |
out_displayid | (out) returns index of the returned part |

#### Returns

A CamelMimePart that should be displayed

### e_mail_part_animation_extract_frame ()

    void
    e_mail_part_animation_extract_frame (GBytes *bytes,
                                         gchar **out_frame,
                                         gsize *out_len);

### e_mail_part_build_uri ()

    gchar *
    e_mail_part_build_uri (CamelFolder *folder,
                           const gchar *message_uid,
                           const gchar *first_param_name,
                           ...);

### e_mail_part_describe ()

    gchar *
    e_mail_part_describe (CamelMimePart *part,
                          const gchar *mime_type);

Generate a simple textual description of a part, `mime_type` represents the content.

#### Parameters

part | a CamelMimePart |
mime_type | MIME type of the content |

### e_mail_part_is_inline ()

    gboolean
    e_mail_part_is_inline (CamelMimePart *part,
                           GQueue *extensions);

### e_mail_part_utils_body_refers ()

    gboolean
    e_mail_part_utils_body_refers (const gchar *body,
                                   const gchar *cid);

Returns whether `body` contains a reference to `cid` enclosed in quotes; returns `FALSE` if any of the arguments is `NULL`.

#### Parameters

body | text body to search for references in; can be `NULL`, then returns `FALSE` |
cid | a Content-ID to search for; if found in body, it should be of form "cid:xxxxx"; can be `NULL` |

## Types and Values