Details
GMIME_MESSAGE_TYPE
#define GMIME_MESSAGE_TYPE g_str_hash ("GMimeMessage") |
GMIME_IS_MESSAGE()
#define GMIME_IS_MESSAGE(object) (object && ((GMimeObject *) object)->type == GMIME_MESSAGE_TYPE) |
GMIME_MESSAGE()
#define GMIME_MESSAGE(object) ((GMimeMessage *) object) |
GMIME_RECIPIENT_TYPE_TO
#define GMIME_RECIPIENT_TYPE_TO "To" |
GMIME_RECIPIENT_TYPE_CC
#define GMIME_RECIPIENT_TYPE_CC "Cc" |
GMIME_RECIPIENT_TYPE_BCC
#define GMIME_RECIPIENT_TYPE_BCC "Bcc" |
struct GMimeMessageHeader
struct GMimeMessageHeader {
char *from;
char *reply_to;
GHashTable *recipients;
char *subject;
time_t date;
int gmt_offset; /* GMT offset */
char *message_id;
GMimeHeader *headers;
}; |
struct GMimeMessage
struct GMimeMessage {
GMimeObject parent_object;
GMimeMessageHeader *header;
GMimePart *mime_part;
}; |
g_mime_message_new ()
If pretty_headers is TRUE, then the standard rfc822 headers are
initialized so as to put headers in a nice friendly order. This is
strictly a cosmetic thing, so if you are unsure, it is safe to say
no (FALSE).
g_mime_message_set_sender ()
void g_mime_message_set_sender (GMimeMessage *message,
const char *sender); |
Set the sender's name and address on the MIME Message.
(ex: "\"Joe Sixpack\" <joesixpack.org>")
g_mime_message_get_sender ()
const char* g_mime_message_get_sender (GMimeMessage *message); |
Gets the email address of the sender from message.
g_mime_message_set_reply_to ()
void g_mime_message_set_reply_to (GMimeMessage *message,
const char *reply_to); |
Set the sender's Reply-To address on the MIME Message.
g_mime_message_get_reply_to ()
const char* g_mime_message_get_reply_to (GMimeMessage *message); |
Gets the Reply-To address from message.
g_mime_message_add_recipient ()
void g_mime_message_add_recipient (GMimeMessage *message,
char *type,
const char *name,
const char *address); |
Add a recipient of a chosen type to the MIME Message. Available
recipient types include: GMIME_RECIPIENT_TYPE_TO,
GMIME_RECIPIENT_TYPE_CC and GMIME_RECIPIENT_TYPE_BCC.
g_mime_message_add_recipients_from_string ()
void g_mime_message_add_recipients_from_string
(GMimeMessage *message,
char *type,
const char *string); |
Add a list of recipients of a chosen type to the MIME
Message. Available recipient types include:
GMIME_RECIPIENT_TYPE_TO, GMIME_RECIPIENT_TYPE_CC and
GMIME_RECIPIENT_TYPE_BCC. The string must be in the format
specified in rfc822.
g_mime_message_get_recipients ()
Gets a list of recipients of type type from message.
g_mime_message_set_subject ()
void g_mime_message_set_subject (GMimeMessage *message,
const char *subject); |
Set the Subject field on a MIME Message.
g_mime_message_get_subject ()
const char* g_mime_message_get_subject (GMimeMessage *message); |
Gets the message's subject.
g_mime_message_set_date ()
void g_mime_message_set_date (GMimeMessage *message,
time_t date,
int gmt_offset); |
Set the sent-date on a MIME Message.
g_mime_message_get_date ()
void g_mime_message_get_date (GMimeMessage *message,
time_t *date,
int *gmt_offset); |
Stores the date in time_t format in date and the GMT offset in
gmt_offset.
g_mime_message_get_date_string ()
char* g_mime_message_get_date_string (GMimeMessage *message); |
Gets the message's sent date in string format.
g_mime_message_set_message_id ()
void g_mime_message_set_message_id (GMimeMessage *message,
const char *id); |
Set the Message-Id on a message.
g_mime_message_get_message_id ()
const char* g_mime_message_get_message_id (GMimeMessage *message); |
Gets the Message-Id header of message.
g_mime_message_add_header ()
void g_mime_message_add_header (GMimeMessage *message,
const char *header,
const char *value); |
Add an arbitrary message header to the MIME Message such as X-Mailer,
X-Priority, or In-Reply-To.
g_mime_message_set_header ()
void g_mime_message_set_header (GMimeMessage *message,
const char *header,
const char *value); |
Set an arbitrary message header to the MIME Message such as X-Mailer,
X-Priority, or In-Reply-To.
g_mime_message_get_header ()
const char* g_mime_message_get_header (GMimeMessage *message,
const char *header); |
Gets the value of the requested header header if it exists, or
NULL otherwise.
g_mime_message_set_mime_part ()
Set the root-level MIME part of the message.
g_mime_message_write_to_stream ()
Write the contents of the MIME Message to string.
g_mime_message_to_string ()
Allocates a string buffer containing the mime message message.
g_mime_message_get_body ()
char* g_mime_message_get_body (const GMimeMessage *message,
gboolean want_plain,
gboolean *is_html); |
Attempts to get the body of the message in the preferred format
specified by want_plain.
g_mime_message_get_headers ()
Allocates a string buffer containing the raw message headers.
g_mime_message_foreach_part ()
Calls callback on each of the mime parts in the mime message.