+
+ // If we have a 'From' field, use it
+ if (!message.m_from.IsEmpty())
+ {
+ mapiMessage.lpOriginator = new MapiRecipDesc;
+ ZeroMemory(mapiMessage.lpOriginator, sizeof(MapiRecipDesc));
+
+ mapiMessage.lpOriginator->ulRecipClass = MAPI_ORIG;
+ // TODO Do we have to call Resolve?
+#ifndef UNICODE
+ mapiMessage.lpOriginator->lpszName = (LPSTR) message.m_from.c_str();
+#else
+ cbOriginator = message.m_from.mb_str();
+ mapiMessage.lpOriginator->lpszName = cbOriginator.data();
+#endif
+ }