aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorEDT 2000 Jeffrey Stedfast <fejj@stampede.org>2000-05-09 21:25:26 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-05-09 21:25:26 +0800
commit93a4ec1e202debe5dac15e090287c05a18d009e6 (patch)
treeaaf9b10469e990ed3efeafcd119d2b96fbb22969 /camel/providers
parenta07fe2730b8ce75e6269f771f63a66c5cb094326 (diff)
downloadgsoc2013-evolution-93a4ec1e202debe5dac15e090287c05a18d009e6.tar
gsoc2013-evolution-93a4ec1e202debe5dac15e090287c05a18d009e6.tar.gz
gsoc2013-evolution-93a4ec1e202debe5dac15e090287c05a18d009e6.tar.bz2
gsoc2013-evolution-93a4ec1e202debe5dac15e090287c05a18d009e6.tar.lz
gsoc2013-evolution-93a4ec1e202debe5dac15e090287c05a18d009e6.tar.xz
gsoc2013-evolution-93a4ec1e202debe5dac15e090287c05a18d009e6.tar.zst
gsoc2013-evolution-93a4ec1e202debe5dac15e090287c05a18d009e6.zip
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
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c56
1 files changed, 29 insertions, 27 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index a19e1903c6..a240ae95ec 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -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 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));
- }
+ /* get all of the To addresses into our recipient list */
+ len = ((CamelAddress *)to)->addresses->len;
+ for (index = 0; index < len; index++) {
+ const char *addr;
+
+ if (camel_internet_address_get(to, index, NULL, &addr))
+ recipients = g_list_append(recipients, g_strdup(addr));
+ }
+
+ /* 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);
}