diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-06-07 08:52:01 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-06-07 08:52:01 +0000 |
commit | bfed07b21a7b4f1b7b5eebd99e469a717a81be26 (patch) | |
tree | 9b30bc8bb89cd22261d6285db70d8669b8a4fc64 /src/compose.c | |
parent | 7f0a8d80fdb7ad6a254bbfa5eb8af0f21f206067 (diff) |
added an option to apply filter rules to sent messages.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@317 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/compose.c')
-rw-r--r-- | src/compose.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/compose.c b/src/compose.c index 376f1d83..d0b3b879 100644 --- a/src/compose.c +++ b/src/compose.c @@ -109,6 +109,7 @@ #include "manage_window.h" #include "gtkshruler.h" #include "folder.h" +#include "filter.h" #include "addr_compl.h" #include "quote_fmt.h" #include "template.h" @@ -2497,12 +2498,26 @@ static gint compose_send(Compose *compose) outbox = account_get_special_folder (compose->account, F_OUTBOX); - if (procmsg_save_to_outbox(outbox, tmp, FALSE) < 0) + if (procmsg_save_to_outbox(outbox, tmp) < 0) alertpanel_error (_("Can't save the message to outbox.")); else folderview_update_item(outbox, TRUE); } + /* filter sent message */ + if (prefs_common.filter_sent) { + FilterInfo *fltinfo; + + fltinfo = filter_info_new(); + fltinfo->account = compose->account; + fltinfo->flags.perm_flags = 0; + fltinfo->flags.tmp_flags = MSG_RECEIVED; + + filter_apply(prefs_common.fltlist, tmp, fltinfo); + + folderview_update_all_updated(TRUE); + filter_info_free(fltinfo); + } } unlink(tmp); |