o Undid changes to camel-internet-address.[c,h] o Fixed
Tue May 9 09:32:33 EDT 2000 Jeffrey Stedfast <fejj@stampede.org> o Undid changes to camel-internet-address.[c,h] o Fixed providers/smtp/camel-smtp-transport.c _send to use camel_internet_address_get() o formatting changes to providers/smtp/camel-smtp-transport.c svn path=/trunk/; revision=2938
This commit is contained in:
committed by
Jeffrey Stedfast
parent
a07fe2730b
commit
93a4ec1e20
@ -1,3 +1,11 @@
|
||||
2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
|
||||
* camel-internet-address.[c,h]: Undid my changes (moved
|
||||
struct _address back into came-internet-address.c)
|
||||
* providers/smtp/camel-smtp-transport.c: (_send): changed
|
||||
from using it's own address manipulation (using struct _address)
|
||||
to using camel_internet_address_get(). Also some format changes
|
||||
to keep consistant with the rest of Camel
|
||||
|
||||
2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
|
||||
|
||||
* camel-internet-address.[c,h]: Moved struct _address from
|
||||
|
||||
@ -30,6 +30,11 @@ static void camel_internet_address_init (CamelInternetAddress *obj);
|
||||
|
||||
static CamelAddressClass *camel_internet_address_parent;
|
||||
|
||||
struct _address {
|
||||
char *name;
|
||||
char *address;
|
||||
};
|
||||
|
||||
enum SIGNALS {
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
@ -39,11 +39,6 @@ struct _CamelInternetAddressClass {
|
||||
CamelAddressClass parent_class;
|
||||
};
|
||||
|
||||
struct _address {
|
||||
char *name;
|
||||
char *address;
|
||||
};
|
||||
|
||||
guint camel_internet_address_get_type (void);
|
||||
CamelInternetAddress *camel_internet_address_new (void);
|
||||
|
||||
|
||||
@ -281,7 +281,7 @@ _send_to (CamelTransport *transport, CamelMedium *message,
|
||||
sender = smtp_get_email_addr_from_text(s);
|
||||
smtp_mail(smtp_transport, sender, ex);
|
||||
g_free(sender);
|
||||
g_free(s);
|
||||
g_free(s);
|
||||
|
||||
if (!(len = g_list_length(recipients))) {
|
||||
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
|
||||
@ -311,38 +311,40 @@ static gboolean
|
||||
_send (CamelTransport *transport, CamelMedium *message,
|
||||
CamelException *ex)
|
||||
{
|
||||
const CamelInternetAddress *to, *cc, *bcc;
|
||||
const CamelInternetAddress *to, *cc, *bcc;
|
||||
GList *recipients = NULL;
|
||||
struct _address *addr;
|
||||
guint index, len;
|
||||
guint index, len;
|
||||
|
||||
to = camel_mime_message_get_recipients ((CamelMimeMessage *) message, CAMEL_RECIPIENT_TYPE_TO);
|
||||
cc = camel_mime_message_get_recipients ((CamelMimeMessage *) message, CAMEL_RECIPIENT_TYPE_CC);
|
||||
bcc = camel_mime_message_get_recipients ((CamelMimeMessage *) message, CAMEL_RECIPIENT_TYPE_BCC);
|
||||
|
||||
/* get all of the To addresses into our recipient list */
|
||||
len = ((CamelAddress *)to)->addresses->len;
|
||||
for (index = 0; index < len; index++)
|
||||
{
|
||||
addr = g_ptr_array_index( ((CamelAddress *)to)->addresses, index);
|
||||
recipients = g_list_append(recipients, g_strdup(addr->address));
|
||||
}
|
||||
/* get all of the To addresses into our recipient list */
|
||||
len = ((CamelAddress *)to)->addresses->len;
|
||||
for (index = 0; index < len; index++) {
|
||||
const char *addr;
|
||||
|
||||
/* get all of the Cc addresses into our recipient list */
|
||||
len = ((CamelAddress *)cc)->addresses->len;
|
||||
for (index = 0; index < len; index++)
|
||||
{
|
||||
addr = g_ptr_array_index( ((CamelAddress *)cc)->addresses, index);
|
||||
recipients = g_list_append(recipients, g_strdup(addr->address));
|
||||
}
|
||||
if (camel_internet_address_get(to, index, NULL, &addr))
|
||||
recipients = g_list_append(recipients, g_strdup(addr));
|
||||
}
|
||||
|
||||
/* get all of the Bcc addresses into our recipient list */
|
||||
len = ((CamelAddress *)bcc)->addresses->len;
|
||||
for (index = 0; index < len; index++)
|
||||
{
|
||||
addr = g_ptr_array_index( ((CamelAddress *)bcc)->addresses, index);
|
||||
recipients = g_list_append(recipients, g_strdup(addr->address));
|
||||
}
|
||||
/* get all of the Cc addresses into our recipient list */
|
||||
len = ((CamelAddress *)cc)->addresses->len;
|
||||
for (index = 0; index < len; index++) {
|
||||
const char *addr;
|
||||
|
||||
if (camel_internet_address_get(cc, index, NULL, &addr))
|
||||
recipients = g_list_append(recipients, g_strdup(addr));
|
||||
}
|
||||
|
||||
/* get all of the Bcc addresses into our recipient list */
|
||||
len = ((CamelAddress *)bcc)->addresses->len;
|
||||
for (index = 0; index < len; index++) {
|
||||
const char *addr;
|
||||
|
||||
if (camel_internet_address_get(bcc, index, NULL, &addr))
|
||||
recipients = g_list_append(recipients, g_strdup(addr));
|
||||
}
|
||||
|
||||
return _send_to (transport, message, recipients, ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user