| Top |
#define GMIME_RECIPIENT_TYPE_TO #define GMIME_RECIPIENT_TYPE_CC #define GMIME_RECIPIENT_TYPE_BCC GMimeMessage; GMimeMessage * g_mime_message_new (gboolean pretty_headers);void g_mime_message_set_sender (GMimeMessage *message, constchar *sender); constchar * g_mime_message_get_sender (GMimeMessage *message);void g_mime_message_set_reply_to (GMimeMessage *message, constchar *reply_to); constchar * g_mime_message_get_reply_to (GMimeMessage *message);void g_mime_message_add_recipient (GMimeMessage *message, constchar *type, constchar *name, constchar *address);void g_mime_message_add_recipients_from_string (GMimeMessage *message, constchar *type, constchar *string); const InternetAddressList * g_mime_message_get_recipients (GMimeMessage *message, constchar *type); InternetAddressList * g_mime_message_get_all_recipients (GMimeMessage *message);void g_mime_message_set_subject (GMimeMessage *message, constchar *subject); constchar * g_mime_message_get_subject (GMimeMessage *message);void g_mime_message_set_date (GMimeMessage *message,time_t date,int gmt_offset);void g_mime_message_get_date (GMimeMessage *message,time_t *date,int *gmt_offset);char * g_mime_message_get_date_string (GMimeMessage *message);void g_mime_message_set_message_id (GMimeMessage *message, constchar *message_id); constchar * g_mime_message_get_message_id (GMimeMessage *message);void g_mime_message_add_header (GMimeMessage *message, constchar *header, constchar *value);void g_mime_message_set_header (GMimeMessage *message, constchar *header, constchar *value); constchar * g_mime_message_get_header (GMimeMessage *message, constchar *header);void g_mime_message_set_mime_part (GMimeMessage *message, GMimeObject *mime_part); GMimeObject * g_mime_message_get_mime_part (GMimeMessage *message);ssize_t g_mime_message_write_to_stream (GMimeMessage *message, GMimeStream *stream);char * g_mime_message_to_string (GMimeMessage *message);char * g_mime_message_get_body (const GMimeMessage *message,gboolean want_plain,gboolean *is_html);char * g_mime_message_get_headers (GMimeMessage *message);void g_mime_message_foreach_part (GMimeMessage *message, GMimePartFunc callback,gpointer data);
GMimeMessage * g_mime_message_new (gboolean pretty_headers);
If pretty_headers is TRUEFALSE
|
make pretty headers |
Returns : |
an empty MIME Message object. |
void g_mime_message_set_sender (GMimeMessage *message, constchar *sender);
Set the sender's name and address on the MIME Message.
(ex: "\"Joe Sixpack\" <joesixpack.org>")
|
MIME Message to change |
|
The name and address of the sender |
constchar * g_mime_message_get_sender (GMimeMessage *message);
Gets the email address of the sender from message.
|
MIME Message |
Returns : |
the sender's name and address of the MIME Message. |
void g_mime_message_set_reply_to (GMimeMessage *message, constchar *reply_to);
Set the sender's Reply-To address on the MIME Message.
|
MIME Message to change |
|
The Reply-To address |
constchar * g_mime_message_get_reply_to (GMimeMessage *message);
Gets the Reply-To address from message.
|
MIME Message |
Returns : |
the sender's Reply-To address from the MIME Message. |
void g_mime_message_add_recipient (GMimeMessage *message, constchar *type, constchar *name, constchar *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.
|
MIME Message to change |
|
Recipient type |
|
The recipient's name |
|
The recipient's address |
void g_mime_message_add_recipients_from_string (GMimeMessage *message, constchar *type, constchar *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.
|
MIME Message |
|
Recipient type |
|
A string of recipient names and addresses. |
const InternetAddressList * g_mime_message_get_recipients (GMimeMessage *message, constchar *type);
Gets a list of recipients of type type from message. Available
recipient types include: GMIME_RECIPIENT_TYPE_TO,
GMIME_RECIPIENT_TYPE_CC and GMIME_RECIPIENT_TYPE_BCC.
|
MIME Message |
|
Recipient type |
Returns : |
a list of recipients of a chosen type from the MIME Message. |
InternetAddressList * g_mime_message_get_all_recipients (GMimeMessage *message);
Gets the complete list of recipients for message.
|
MIME Message |
Returns : |
a newly allocated InternetAddressList containing all recipients of the message. |
void g_mime_message_set_subject (GMimeMessage *message, constchar *subject);
Set the unencoded UTF-8 Subject field on a MIME Message.
|
MIME Message |
|
Subject string |
constchar * g_mime_message_get_subject (GMimeMessage *message);
Gets the message's subject.
|
MIME Message |
Returns : |
the unencoded UTF-8 Subject field on a MIME Message. |
void g_mime_message_set_date (GMimeMessage *message,time_t date,int gmt_offset);
Sets the sent-date on a MIME Message.
|
MIME Message |
|
Sent-date (ex: gotten from time (NULL)) |
|
GMT date offset (in +/- hours) |
void g_mime_message_get_date (GMimeMessage *message,time_t *date,int *gmt_offset);
Stores the date in time_t format in gmt_offset.
|
MIME Message |
|
Sent-date |
|
GMT date offset (in +/- hours) |
char * g_mime_message_get_date_string (GMimeMessage *message);
Gets the message's sent date in string format.
|
MIME Message |
Returns : |
the sent-date of the MIME Message in string format. |
void g_mime_message_set_message_id (GMimeMessage *message, constchar *message_id);
Set the Message-Id on a message.
|
MIME Message |
|
message-id (addr-spec portion) |
constchar * g_mime_message_get_message_id (GMimeMessage *message);
Gets the Message-Id header of message.
|
MIME Message |
Returns : |
the Message-Id of a message. |
void g_mime_message_add_header (GMimeMessage *message, constchar *header, constchar *value);
Add an arbitrary message header to the MIME Message such as X-Mailer, X-Priority, or In-Reply-To.
|
MIME Message |
|
rfc822 header field |
|
the contents of the header field |
void g_mime_message_set_header (GMimeMessage *message, constchar *header, constchar *value);
Set an arbitrary message header to the MIME Message such as X-Mailer, X-Priority, or In-Reply-To.
|
MIME Message |
|
rfc822 header field |
|
the contents of the header field |
constchar * g_mime_message_get_header (GMimeMessage *message, constchar *header);
Gets the value of the requested header header if it exists, or
NULL
|
MIME Message |
|
rfc822 header field |
Returns : |
the value of the requested header (or NULL |
void g_mime_message_set_mime_part (GMimeMessage *message, GMimeObject *mime_part);
Set the root-level MIME part of the message.
|
MIME Message |
|
The root-level MIME Part |
GMimeObject * g_mime_message_get_mime_part (GMimeMessage *message);
Gets the toplevel MIME part contained within message.
|
MIME Message |
Returns : |
the toplevel MIME part of message.
|
ssize_t g_mime_message_write_to_stream (GMimeMessage *message, GMimeStream *stream);
g_mime_message_write_to_stream is deprecated and should not be used in newly-written code.
Write the contents of the MIME Message to stream.
WARNING: This interface is deprecated. Use
g_mime_object_write_to_stream() instead.
|
MIME Message |
|
output stream |
Returns : |
%-1 on fail. |
char * g_mime_message_to_string (GMimeMessage *message);
g_mime_message_to_string is deprecated and should not be used in newly-written code.
Allocates a string buffer containing the mime message message.
WARNING: This interface is deprecated. Use
g_mime_object_to_string() instead.
|
MIME Message |
Returns : |
an allocated string containing the MIME Message. |
char * g_mime_message_get_body (const GMimeMessage *message,gboolean want_plain,gboolean *is_html);
g_mime_message_get_body is deprecated and should not be used in newly-written code.
Attempts to get the body of the message in the preferred format
specified by want_plain.
WARNING: This interface is deprecated.
|
MIME Message |
|
request text/plain |
|
body returned is in html format |
Returns : |
the prefered form of the message body. Sets the value of
is_html to TRUEFALSE |
char * g_mime_message_get_headers (GMimeMessage *message);
Allocates a string buffer containing the raw message headers.
|
MIME Message |
Returns : |
an allocated string containing the raw message headers. |
void g_mime_message_foreach_part (GMimeMessage *message, GMimePartFunc callback,gpointer data);
Calls callback on each of the mime parts in the mime message.
|
MIME message |
|
function to call on each of the mime parts contained by the mime message |
|
extra data to pass to the callback |