InternetAddress

## InternetAddress InternetAddress — Internet addresses |

## Functions

const char * | internet_address_get_name ()
void | internet_address_set_name ()
char * | internet_address_to_string ()

## Types and Values

struct | InternetAddress

## Description

An InternetAddress is the base class for InternetAddressGroup and InternetAddressMailbox.

## Functions

### internet_address_get_name ()

    const char *
    internet_address_get_name (InternetAddress *ia);

Gets the display name of the InternetAddress.

#### Parameters

ia | a InternetAddress |

#### Returns

the name of the mailbox or group in a form suitable for display if available or `NULL` otherwise. If the name is available, the returned string will be in UTF-8.

### internet_address_set_name ()

    void
    internet_address_set_name (InternetAddress *ia,
                               const char *name);

Set the display name of the InternetAddress.

Note: The `name` string should be in UTF-8.

#### Parameters

ia | a InternetAddress |
name | the display name for the address group or mailbox |

### internet_address_to_string ()

    char *
    internet_address_to_string (InternetAddress *ia,
                                gboolean encode);

Allocates a string containing the contents of the InternetAddress object.

#### Parameters

ia | Internet Address object |
encode | `TRUE` if the address should be rfc2047 encoded |

#### Returns

the InternetAddress object as an allocated string in rfc822 format.

## Types and Values

### struct InternetAddress

    struct InternetAddress {
    	GObject parent_object;
    	gpointer priv;

    	char *name;
    };

An RFC 2822 Address object.

#### Members

GObject `parent_object`; | parent GObject |
gpointer `priv`; | private data |
char *`name`; | display name |

## See Also

InternetAddressGroup, InternetAddressMailbox