winemapi: Address can contain "SMTP:".
Alexander Morozov
amorozov at etersoft.ru
Mon Jan 31 08:35:31 CST 2011
Address can contain "SMTP:". See lpszAddress field description:
http://msdn.microsoft.com/en-us/library/dd296720(v=vs.85).aspx
-------------- next part --------------
From b62a06400bca42251d47764b2636d26aee2e503f Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov at etersoft.ru>
Date: Fri, 14 Jan 2011 17:58:55 +0300
Subject: [PATCH 2/2] winemapi: Address can contain "SMTP:".
---
dlls/winemapi/sendmail.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/winemapi/sendmail.c b/dlls/winemapi/sendmail.c
index 44c1d00..e4629bb 100644
--- a/dlls/winemapi/sendmail.c
+++ b/dlls/winemapi/sendmail.c
@@ -66,6 +66,7 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
const char *address, *subject, *body;
static const char format[] =
"mailto:\"%s\"?subject=\"%s\"&cc=\"%s\"&bcc=\"%s\"&body=\"%s\"";
+ static const char smtp[] = "smtp:";
char *mailto = NULL, *escape = NULL;
char empty_string[] = "";
HRESULT res;
@@ -86,6 +87,8 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
}
address = message->lpRecips[i].lpszAddress;
+ if (!strncasecmp(address, smtp, sizeof(smtp) - 1))
+ address += sizeof(smtp) - 1;
if (address)
{
@@ -169,6 +172,8 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
for (i = 0; i < message->nRecipCount; i++)
{
address = message->lpRecips[i].lpszAddress;
+ if (!strncasecmp(address, smtp, sizeof(smtp) - 1))
+ address += sizeof(smtp) - 1;
if (address)
{
--
1.7.3.5
More information about the wine-patches
mailing list