aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-component.c24
2 files changed, 28 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d38c8202c6..0e005ad0c1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-04 Veerapuram Varadhan <vvaradhan@novell.com>
+
+ * mail-component.c: (handleuri_got_folder): Added "forward"
+ command-line option.
+
2005-06-24 Matt Brown <matt@mattb.net.nz>
* em-inline-filter.c: implement extraction of inline signed/encrypted pgp
diff --git a/mail/mail-component.c b/mail/mail-component.c
index be881b1fa6..ac6453de28 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -821,9 +821,10 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
if (folder != NULL) {
const char *reply = camel_url_get_param(url, "reply");
+ const char *forward = camel_url_get_param(url, "forward");
+ int mode;
if (reply) {
- int mode;
if (!strcmp(reply, "all"))
mode = REPLY_MODE_ALL;
@@ -833,6 +834,27 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
mode = REPLY_MODE_SENDER;
em_utils_reply_to_message(folder, camel_url_get_param(url, "uid"), NULL, mode, NULL);
+ } else if (forward) {
+ GPtrArray *uids;
+ const char* uid;
+
+ uid = camel_url_get_param(url, "uid");
+ if (uid == NULL)
+ g_warning("Could not forward the message. UID is NULL.");
+ else {
+ uids = g_ptr_array_new();
+ g_ptr_array_add(uids, g_strdup(uid));
+
+ if (!strcmp(forward, "attached"))
+ em_utils_forward_attached(folder, uids, uri);
+ else if (!strcmp(forward, "inline"))
+ em_utils_forward_inline(folder, uids, uri);
+ else if (!strcmp(forward, "quoted"))
+ em_utils_forward_quoted(folder, uids, uri);
+ else { /* Just the default forward */
+ em_utils_forward_messages(folder, uids, uri);
+ }
+ }
} else {
emmb = (EMMessageBrowser *)em_message_browser_window_new();
/*message_list_set_threaded(((EMFolderView *)emmb)->list, emfv->list->threaded);*/