aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-05-24 14:37:30 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-05-24 14:37:30 +0800
commitf836bed24997c679b99762ac81c8475110d29251 (patch)
tree07bc08b7ea6e09b8af55cc274634cebbdc6abb5e /mail
parente7d495a63b0074461e738b33d949889d3d304d57 (diff)
downloadgsoc2013-evolution-f836bed24997c679b99762ac81c8475110d29251.tar
gsoc2013-evolution-f836bed24997c679b99762ac81c8475110d29251.tar.gz
gsoc2013-evolution-f836bed24997c679b99762ac81c8475110d29251.tar.bz2
gsoc2013-evolution-f836bed24997c679b99762ac81c8475110d29251.tar.lz
gsoc2013-evolution-f836bed24997c679b99762ac81c8475110d29251.tar.xz
gsoc2013-evolution-f836bed24997c679b99762ac81c8475110d29251.tar.zst
gsoc2013-evolution-f836bed24997c679b99762ac81c8475110d29251.zip
If we can't find the mailing list address in the recipients list, just
2002-05-24 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (mail_generate_reply): If we can't find the mailing list address in the recipients list, just Reply-to-All instead. svn path=/trunk/; revision=16998
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-callbacks.c20
2 files changed, 24 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index daf5af8615..89a1c98b36 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-callbacks.c (mail_generate_reply): If we can't find the
+ mailing list address in the recipients list, just Reply-to-All
+ instead.
+
2002-05-23 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser-window.c (folder_browser_window_new): Set the ui
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 21c6aea978..b232813ed3 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -888,6 +888,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
if (source)
me = mail_config_get_account_by_source_url (source);
+ determine_recipients:
if (mode == REPLY_LIST) {
CamelMessageInfo *info;
const char *mlist;
@@ -897,9 +898,13 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
mlist = camel_message_info_mlist (info);
if (mlist) {
+ EDestination *dest;
+
/* look through the recipients to find the *real* mailing list address */
len = strlen (mlist);
+ printf ("we are looking for the mailing list called: %s\n", mlist);
+
to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
max = camel_address_length (CAMEL_ADDRESS (to_addrs));
for (i = 0; i < max; i++) {
@@ -919,13 +924,24 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
}
if (address && i != max) {
- EDestination *dest;
-
dest = e_destination_new ();
e_destination_set_name (dest, name);
e_destination_set_email (dest, address);
to = g_list_append (to, dest);
+ } else {
+ /* mailing list address wasn't found */
+ if (strchr (mlist, '@')) {
+ /* mlist string has an @, maybe it's valid? */
+ dest = e_destination_new ();
+ e_destination_set_email (dest, mlist);
+
+ to = g_list_append (to, dest);
+ } else {
+ /* give up and just reply to all recipients? */
+ mode = REPLY_ALL;
+ goto determine_recipients;
+ }
}
}