summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Budea <baron@caesar.elte.hu>2014-12-22 06:23:46 +0100
committerMichael Stahl <mstahl@redhat.com>2015-02-07 00:54:19 +0100
commit7ce1e0e1ecbb1b3ec5e3cc15306a9df7e786c564 (patch)
treed771bad8cbdb4c77a1f309ade35784b5ca1aef67
parent4be6e7becec9413cfd22c06376031b02486145b2 (diff)
fdo#43368 Remove MapiLogon/Logoff calls so simplemail works with WLM
Signed-off-by: Michael Stahl <mstahl@redhat.com> Conflicts: shell/source/win32/simplemail/senddoc.cxx Change-Id: I31cac063ffb4afbfde068558ebcf5f66ea34d1a8
-rw-r--r--shell/source/win32/simplemail/senddoc.cxx49
1 files changed, 22 insertions, 27 deletions
diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 37c5377103b9..10a0775ce6ab 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -263,40 +263,35 @@ int main(int argc, char* argv[])
// is installed as Exchange and Mail Client a Profile
// selection dialog must appear because we specify no
// profile name, so the user has to specify a profile
- FLAGS flFlag = MAPI_NEW_SESSION | MAPI_LOGON_UI;
- LHANDLE hSession;
- ulRet = mapi.MAPILogon(0, NULL, NULL, flFlag, 0L, &hSession);
- if (ulRet == SUCCESS_SUCCESS)
- {
- MapiRecipDesc mapiOriginator;
- MapiRecipientList_t mapiRecipientList;
- MapiAttachmentList_t mapiAttachmentList;
- MapiMessage mapiMsg;
+ LHANDLE hSession = 0;
- initMapiOriginator(&mapiOriginator);
- initRecipientList(&mapiRecipientList);
- initAttachmentList(&mapiAttachmentList);
- initMapiMessage((gFrom.length() ? &mapiOriginator : NULL), mapiRecipientList, mapiAttachmentList, &mapiMsg);
+ MapiRecipDesc mapiOriginator;
+ MapiRecipientList_t mapiRecipientList;
+ MapiAttachmentList_t mapiAttachmentList;
+ MapiMessage mapiMsg;
- ulRet = mapi.MAPISendMail(hSession, 0, &mapiMsg, gMapiFlags, 0);
+ initMapiOriginator(&mapiOriginator);
+ initRecipientList(&mapiRecipientList);
+ initAttachmentList(&mapiAttachmentList);
+ initMapiMessage((gFrom.length() ? &mapiOriginator : NULL), mapiRecipientList, mapiAttachmentList, &mapiMsg);
- // 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.
+ ulRet = mapi.MAPISendMail(hSession, 0, &mapiMsg, gMapiFlags, 0);
- // 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).
+ // 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.
- if (ulRet == MAPI_E_USER_ABORT)
- ulRet = SUCCESS_SUCCESS;
+ // 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);
- }
}
catch (const std::runtime_error&
#if OSL_DEBUG_LEVEL > 0