From c528e9e8dc50dd4e1d1c8ddf5976da17dc4b45f6 Mon Sep 17 00:00:00 2001 From: Owen Rudge Date: Thu, 1 Oct 2009 14:10:50 +0100 Subject: [PATCH] mapi32: Add stub of Extended MAPI wrapper for MAPISendMail. --- dlls/mapi32/sendmail.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c index 5054be80f61..d98f8bf8bbd 100644 --- a/dlls/mapi32/sendmail.c +++ b/dlls/mapi32/sendmail.c @@ -38,6 +38,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(mapi); +/* + Internal function to send a message via Extended MAPI. Wrapper around the Simple + MAPI function MAPISendMail. +*/ +static ULONG sendmail_extended_mapi(LHANDLE mapi_session, ULONG_PTR uiparam, lpMapiMessage message, + FLAGS flags, ULONG reserved) +{ + TRACE("Using Extended MAPI wrapper for MAPISendMail\n"); + + MAPIUninitialize(); + return MAPI_E_FAILURE; +} + /************************************************************************** * MAPISendMail (MAPI32.211) * @@ -80,8 +93,9 @@ ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam, if (mapiFunctions.MAPISendMail) return mapiFunctions.MAPISendMail(session, uiparam, message, flags, reserved); - /* TODO: Check if we have an Extended MAPI provider, if so, implement - wrapper around that. */ + /* Check if we have an Extended MAPI provider - if so, use our wrapper */ + if (MAPIInitialize(NULL) == S_OK) + return sendmail_extended_mapi(session, uiparam, message, flags, reserved); /* Fall back on our own implementation */ if (!message) return MAPI_E_FAILURE;