summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-01-11 18:50:54 +0200
committerTor Lillqvist <tml@hemulen.(none)>2011-01-11 18:52:13 +0200
commitac7c887941632f51f7260e945aa04239a3599919 (patch)
treeb5beaa90941b0afdf463e6e81b6ef951acd2acf4 /shell
parent1914f0dc43cb6af931a350a4e9d694d6801f41a9 (diff)
Treat MAPI_E_USER_ABORT as success (bnc#660241)
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/simplemail/senddoc.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 76aa7cc517..93e6d36acf 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -301,6 +301,20 @@ int main(int argc, char* argv[])
ulRet = mapi.MAPISendMail(hSession, 0, &mapiMsg, gMapiFlags, 0);
+ // There is no point in treating an aborted mail sending
+ // dialog as an error to be returned as our exit
+ // status. If the user decided to abort sending a document
+ // as mail, OK, that is not an error.
+
+ // Also, it seems that GroupWise makes MAPISendMail()
+ // return MAPI_E_USER_ABORT even if the mail sending
+ // dialog was not aborted by the user, and the mail was
+ // actually sent just fine. See bnc#660241 (visible to
+ // Novell people only, sorry).
+
+ if (ulRet == MAPI_E_USER_ABORT)
+ ulRet = SUCCESS_SUCCESS;
+
mapi.MAPILogoff(hSession, 0, 0, 0);
}
}