Kaydet (Commit) 7ce1e0e1 authored tarafından Aron Budea's avatar Aron Budea Kaydeden (comit) Michael Stahl

fdo#43368 Remove MapiLogon/Logoff calls so simplemail works with WLM

Signed-off-by: 's avatarMichael Stahl <mstahl@redhat.com>

Conflicts:
	shell/source/win32/simplemail/senddoc.cxx

Change-Id: I31cac063ffb4afbfde068558ebcf5f66ea34d1a8
üst 4be6e7be
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment