159
157
rc = MAPILogon(0, profileName, password, MAPI_LOGON_UI, 0, byref(pSession))
160
158
if rc != SUCCESS_SUCCESS:
166
164
rc = MAPILogoff(session, 0, 0, 0)
167
165
if rc != SUCCESS_SUCCESS:
171
169
def _resolveName(session, name):
172
170
pRecipDesc = lpMapiRecipDesc()
173
171
rc = MAPIResolveName(session, 0, name, 0, 0, byref(pRecipDesc))
174
172
if rc != SUCCESS_SUCCESS:
177
175
name, address = rd.lpszName, rd.lpszAddress
178
176
rc = MAPIFreeBuffer(pRecipDesc)
179
177
if rc != SUCCESS_SUCCESS: