Commit a48b5387 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

inetcomm: Add an implementation of ISMTPTransport2::CommandAUTH.

parent d9c4f5fc
......@@ -796,8 +796,28 @@ static HRESULT WINAPI SMTPTransport_CommandHELO(ISMTPTransport2 *iface)
static HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface,
LPSTR pszAuthType)
{
FIXME("(%s)\n", pszAuthType);
return E_NOTIMPL;
SMTPTransport *This = (SMTPTransport *)iface;
const char szCommandFormat[] = "AUTH %s\n";
char *szCommand;
int len = sizeof(szCommandFormat) - 2 /* "%s" */ + strlen(pszAuthType);
HRESULT hr;
TRACE("(%s)\n", pszAuthType);
if (!pszAuthType)
return E_INVALIDARG;
szCommand = HeapAlloc(GetProcessHeap(), 0, len);
if (!szCommand)
return E_OUTOFMEMORY;
sprintf(szCommand, szCommandFormat, pszAuthType);
hr = InternetTransport_DoCommand(&This->InetTransport, szCommand,
SMTPTransport_CallbackReadResponseDoNothing);
HeapFree(GetProcessHeap(), 0, szCommand);
return hr;
}
static HRESULT WINAPI SMTPTransport_CommandQUIT(ISMTPTransport2 *iface)
......
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