static struct RemoteCmd {
gboolean receive;
gboolean receive_all;
+ gboolean cancel_receiving;
gboolean compose;
const gchar *compose_mailto;
GList *attach_files;
#endif
if (cmd.status || cmd.status_full || cmd.search ||
- cmd.statistics || cmd.reset_statistics) {
+ cmd.statistics || cmd.reset_statistics || cmd.cancel_receiving) {
puts("0 Claws Mail not running.");
lock_socket_remove();
return 0;
cmd.receive_all = TRUE;
} else if (!strncmp(argv[i], "--receive", 9)) {
cmd.receive = TRUE;
+ } else if (!strncmp(argv[i], "--cancel-receiving", 18)) {
+ cmd.cancel_receiving = TRUE;
} else if (!strncmp(argv[i], "--compose-from-file", 19)) {
const gchar *p = (i+1 < argc)?argv[i+1]:NULL;
" attached"));
g_print("%s\n", _(" --receive receive new messages"));
g_print("%s\n", _(" --receive-all receive new messages of all accounts"));
+ g_print("%s\n", _(" --cancel-receiving cancel receiving of messages"));
g_print("%s\n", _(" --search folder type request [recursive]\n"
" searches mail\n"
" folder ex.: \"#mh/Mailbox/inbox\" or \"Mail\"\n"
fd_write_all(uxsock, "receive_all\n", 12);
} else if (cmd.receive) {
fd_write_all(uxsock, "receive\n", 8);
+ } else if (cmd.cancel_receiving) {
+ fd_write_all(uxsock, "cancel_receiving\n", 17);
} else if (cmd.compose && cmd.attach_files) {
gchar *str, *compose_str;
prefs_common.newmail_notify_manu);
} else if (!strncmp(buf, "receive", 7)) {
inc_mail(mainwin, prefs_common.newmail_notify_manu);
+ } else if (!strncmp(buf, "cancel_receiving", 16)) {
+ inc_cancel_all();
+ imap_cancel_all();
} else if (!strncmp(buf, "compose_attach", 14)) {
GList *files = NULL, *curr;
AttachInfo *ainfo;