Top | ![]() |
![]() |
![]() |
![]() |
ESourceMailIdentityESourceMailIdentity — ESource extension for an email identity |
The ESourceMailIdentity extension describes an "identity" for a mail account, which is the information that other people see when they read your messages.
Access the extension as follows:
1 2 3 4 5 |
#include <libedataserver/libedataserver.h> ESourceMailIdentity *extension; extension = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_IDENTITY); |
const gchar *
e_source_mail_identity_get_address (ESourceMailIdentity *extension
);
Returns the email address for this identity from which to send messages.
This may be an empty string but will never be NULL
.
Since: 3.6
gchar *
e_source_mail_identity_dup_address (ESourceMailIdentity *extension
);
Thread-safe variation of e_source_mail_identity_get_address()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
when no longer needed.
Since: 3.6
void e_source_mail_identity_set_address (ESourceMailIdentity *extension
,const gchar *address
);
Sets the email address for this identity from which to send messages.
The internal copy of address
is automatically stripped of leading and
trailing whitespace. If the resulting string is empty, NULL
is set
instead.
Since: 3.6
const gchar *
e_source_mail_identity_get_name (ESourceMailIdentity *extension
);
Returns the sender's name for this identity.
Since: 3.6
gchar *
e_source_mail_identity_dup_name (ESourceMailIdentity *extension
);
Thread-safe variation of e_source_mail_identity_get_name()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
when no longer needed.
Since: 3.6
void e_source_mail_identity_set_name (ESourceMailIdentity *extension
,const gchar *name
);
Sets the sender's name for this identity.
The internal copy of name
is automatically stripped of leading and
trailing whitespace.
Since: 3.6
const gchar *
e_source_mail_identity_get_organization
(ESourceMailIdentity *extension
);
Returns the sender's organization for this identity.
Since: 3.6
gchar *
e_source_mail_identity_dup_organization
(ESourceMailIdentity *extension
);
Thread-safe variation of e_source_mail_identity_dup_organization()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
when no longer needed.
Since: 3.6
void e_source_mail_identity_set_organization (ESourceMailIdentity *extension
,const gchar *organization
);
Sets the sender's organization for this identity.
The internal copy of organization
is automatically stripped of leading
and trailing whitespace. If the resulting string is empty, NULL
is set
instead.
Since: 3.6
const gchar *
e_source_mail_identity_get_reply_to (ESourceMailIdentity *extension
);
Returns the email address for this identity to which recipients should send replies.
Since: 3.6
gchar *
e_source_mail_identity_dup_reply_to (ESourceMailIdentity *extension
);
Thread-safe variation of e_source_mail_identity_get_reply_to()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
when no longer needed.
Since: 3.6
void e_source_mail_identity_set_reply_to (ESourceMailIdentity *extension
,const gchar *reply_to
);
Sets the email address for this identity to which recipients should send replies.
The internal copy of reply_to
is automatically stripped of leading
and trailing whitespace. If the resulting string is empty, NULL
is
set instead.
Since: 3.6
const gchar *
e_source_mail_identity_get_signature_uid
(ESourceMailIdentity *extension
);
Returns the “uid” of an ESource describing a mail signature.
If the user does not want to use a signature for this identity, the convention is to set the “signature-uid” property to "none".
Since: 3.6
gchar *
e_source_mail_identity_dup_signature_uid
(ESourceMailIdentity *extension
);
Thread-safe variation of e_source_mail_identity_get_signature_uid()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
when no longer needed.
Since: 3.6
void e_source_mail_identity_set_signature_uid (ESourceMailIdentity *extension
,const gchar *signature_uid
);
Sets the “uid” of an ESource describing a mail signature.
If the user does not want to use a signature for this identity, the
convention is to set the “signature-uid” property
to "none". In keeping with that convention, the property will be set
to "none" if signature_uid
is NULL
or an empty string.
Since: 3.6
const gchar *
e_source_mail_identity_get_aliases (ESourceMailIdentity *extension
);
Returns the email address aliases for this identity. These are comma-separated
email addresses which may or may not contain also different name.
This may be an empty string, but will never be NULL
.
There can be used camel_address_decode()
on a CamelInternetAddress
to decode the list of aliases.
Since: 3.24
gchar *
e_source_mail_identity_dup_aliases (ESourceMailIdentity *extension
);
Thread-safe variation of e_source_mail_identity_get_aliases()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
when no longer needed.
Since: 3.24
void e_source_mail_identity_set_aliases (ESourceMailIdentity *extension
,const gchar *aliases
);
Sets the email address aliases for this identity. These are comma-separated email addresses which may or may not contain also different name.
The internal copy of aliases
is automatically stripped of leading and
trailing whitespace. If the resulting string is empty, NULL
is set
instead.
Since: 3.24
GHashTable *
e_source_mail_identity_get_aliases_as_hash_table
(ESourceMailIdentity *extension
);
Returns a set aliases as a hash table with address as key and
name as value of the hash table. The name can be sometimes
empty or NULL, thus rather use g_hash_table_contains()
when
checking for particular address. The addresses are
compared case insensitively. The same addresses with a different
name are included only once, the last variant of it. Use
e_source_mail_identity_get_aliases()
if you need more fine-grained
control on the list of aliases.
A newly created
GHashTable will all the aliases. Returns NULL
if there are none set.
Use g_hash_table_destroy()
to free the returned hash table.
[transfer full][element-type utf8 utf8][nullable]
Since: 3.24
#define E_SOURCE_EXTENSION_MAIL_IDENTITY "Mail Identity"
Pass this extension name to e_source_get_extension()
to access
ESourceMailIdentity. This is also used as a group name in key files.
Since: 3.6
struct ESourceMailIdentity;
Contains only private data that should be read and manipulated using the functions below.
Since: 3.6