aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog17
-rw-r--r--camel/camel-internet-address.c5
-rw-r--r--camel/camel-internet-address.h5
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c29
4 files changed, 44 insertions, 12 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index dffbc5ffd5..c516eaf6c4 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,12 @@
+2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
+
+ * camel-internet-address.[c,h]: Moved struct _address from
+ camel-internet-address.c to camel-internet-address.h
+ (hopefully this doesn't break anything...)
+ * providers/smtp/camel-smtp-transport.c: (_send): now
+ populates the recipient list with To, Cc, and Bcc addresses.
+ Should now be able to use this module.
+
2000-05-09 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
@@ -5,10 +14,10 @@
2000-05-08 Jeffrey Stedfast <fejj@stampede.org>
- * camel-smtp-transport.c: no longer frees memory it shouldn't,
- updated to reflect camel-stream changes involving CamelException
- (perhaps it should use a different CamelException variable than
- is passed to the camel smtp module?)
+ * providers/smtp/camel-smtp-transport.c: no longer frees memory it
+ shouldn't, updated to reflect camel-stream changes involving
+ CamelException (perhaps it should use a different CamelException
+ variable than is passed to the camel smtp module?)
2000-05-08 Dan Winship <danw@helixcode.com>
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
index 564c59e93d..49b94d8b9c 100644
--- a/camel/camel-internet-address.c
+++ b/camel/camel-internet-address.c
@@ -21,11 +21,6 @@
#include "camel-mime-utils.h"
#include "camel-internet-address.h"
-struct _address {
- char *name;
- char *address;
-};
-
static int internet_decode (CamelAddress *, const char *raw);
static char * internet_encode (CamelAddress *);
static void internet_remove (CamelAddress *, int index);
diff --git a/camel/camel-internet-address.h b/camel/camel-internet-address.h
index 14fbd5436a..d817a2e7cd 100644
--- a/camel/camel-internet-address.h
+++ b/camel/camel-internet-address.h
@@ -39,6 +39,11 @@ struct _CamelInternetAddressClass {
CamelAddressClass parent_class;
};
+struct _address {
+ char *name;
+ char *address;
+};
+
guint camel_internet_address_get_type (void);
CamelInternetAddress *camel_internet_address_new (void);
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index ed7b3fb2be..a19e1903c6 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -313,13 +313,36 @@ _send (CamelTransport *transport, CamelMedium *message,
{
const CamelInternetAddress *to, *cc, *bcc;
GList *recipients = NULL;
+ struct _address *addr;
+ guint index, len;
- /* TODO: we want to dump all recipient addresses into a GList */
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);
- /*recipients = g_list_concat(to, cc);
- recipients = g_list_concat(recipients, 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 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));
+ }
+
+ /* 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));
+ }
return _send_to (transport, message, recipients, ex);
}