Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6e33bfb7
Commit
6e33bfb7
authored
Oct 01, 2009
by
Owen Rudge
Committed by
Alexandre Julliard
Oct 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapi32: Open the Drafts folder in preparation for creating a message.
parent
8555035d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
sendmail.c
dlls/mapi32/sendmail.c
+38
-0
mapitags.h
include/mapitags.h
+1
-0
No files found.
dlls/mapi32/sendmail.c
View file @
6e33bfb7
...
...
@@ -48,10 +48,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(mapi);
static
ULONG
sendmail_extended_mapi
(
LHANDLE
mapi_session
,
ULONG_PTR
uiparam
,
lpMapiMessage
message
,
FLAGS
flags
,
ULONG
reserved
)
{
ULONG
tags
[]
=
{
1
,
PR_IPM_DRAFTS_ENTRYID
};
ULONG
retval
=
MAPI_E_FAILURE
;
IMAPISession
*
session
=
NULL
;
IMAPITable
*
msg_table
;
LPSRowSet
rows
=
NULL
;
IMsgStore
*
msg_store
;
IMAPIFolder
*
folder
;
LPENTRYID
entry_id
;
LPSPropValue
props
;
ULONG
entry_len
;
DWORD
obj_type
;
ULONG
values
;
HRESULT
ret
;
TRACE
(
"Using Extended MAPI wrapper for MAPISendMail
\n
"
);
...
...
@@ -110,9 +118,39 @@ static ULONG sendmail_extended_mapi(LHANDLE mapi_session, ULONG_PTR uiparam, lpM
if
(
!
rows
)
goto
logoff
;
/* Open the message store */
IMAPISession_OpenMsgStore
(
session
,
0
,
rows
->
aRow
[
0
].
lpProps
[
0
].
Value
.
bin
.
cb
,
(
ENTRYID
*
)
rows
->
aRow
[
0
].
lpProps
[
0
].
Value
.
bin
.
lpb
,
NULL
,
MDB_NO_DIALOG
|
MAPI_BEST_ACCESS
,
&
msg_store
);
/* We don't need this any more */
FreeProws
(
rows
);
/* First open the inbox, from which the drafts folder can be opened */
if
(
IMsgStore_GetReceiveFolder
(
msg_store
,
NULL
,
0
,
&
entry_len
,
&
entry_id
,
NULL
)
==
S_OK
)
{
IMsgStore_OpenEntry
(
msg_store
,
entry_len
,
entry_id
,
NULL
,
0
,
&
obj_type
,
(
LPUNKNOWN
*
)
&
folder
);
MAPIFreeBuffer
(
entry_id
);
}
/* Open the drafts folder, or failing that, try asking the message store for the outbox */
if
((
folder
==
NULL
)
||
((
ret
=
IMAPIFolder_GetProps
(
folder
,
(
LPSPropTagArray
)
tags
,
0
,
&
values
,
&
props
))
!=
S_OK
))
{
TRACE
(
"Unable to open Drafts folder; opening Outbox instead
\n
"
);
tags
[
1
]
=
PR_IPM_OUTBOX_ENTRYID
;
ret
=
IMsgStore_GetProps
(
msg_store
,
(
LPSPropTagArray
)
tags
,
0
,
&
values
,
&
props
);
}
if
(
ret
!=
S_OK
)
goto
logoff
;
IMsgStore_OpenEntry
(
msg_store
,
props
[
0
].
Value
.
bin
.
cb
,
(
LPENTRYID
)
props
[
0
].
Value
.
bin
.
lpb
,
NULL
,
MAPI_MODIFY
,
&
obj_type
,
(
LPUNKNOWN
*
)
&
folder
);
/* Free up the resources we've used */
IMAPIFolder_Release
(
folder
);
IMsgStore_Release
(
msg_store
);
logoff:
;
IMAPISession_Logoff
(
session
,
(
ULONG
)
NULL
,
0
,
0
);
IMAPISession_Release
(
session
);
...
...
include/mapitags.h
View file @
6e33bfb7
...
...
@@ -452,6 +452,7 @@
#define PR_AB_PROVIDER_ID PROP_TAG(PT_BINARY,0x3615)
#define PR_DEFAULT_VIEW_ENTRYID PROP_TAG(PT_BINARY,0x3616)
#define PR_ASSOC_CONTENT_COUNT PROP_TAG(PT_I4,0x3617)
#define PR_IPM_DRAFTS_ENTRYID PROP_TAG(PT_BINARY,0x36D7)
#define PR_ATTACHMENT_X400_PARAMETERS PROP_TAG(PT_BINARY,0x3700)
#define PR_ATTACH_DATA_OBJ PROP_TAG(PT_OBJECT,0x3701)
#define PR_ATTACH_DATA_BIN PROP_TAG(PT_BINARY,0x3701)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment