From f5b39cfc3cdf3d180b2d05ac0a2e6c407b3ca4ef Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Fri, 14 Jan 2011 17:58:55 +0300 Subject: [PATCH] winemapi: Address can contain "SMTP:". --- dlls/winemapi/sendmail.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/winemapi/sendmail.c b/dlls/winemapi/sendmail.c index 44c1d00fd31..e4629bb2675 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) { -- 2.11.4.GIT