Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 1760bbde8794f5b323299b3a051b5bd6 > files > 87

openchange-devel-0.9-11.fc14.x86_64.rpm

<html>
  <head>
    <title>MAPIClientLibraries 0.9 API Documentation</title>
    <link href="doxygen.css" rel="stylesheet" type="text/css"/>
    <link href="apidocs.css" rel="stylesheet" type="text/css"/>
  </head>
  <body>
    <div id="website">
    <div class="header"></div>
      <div id="middle_side">
	<div id="right_side_home">
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>libmapi/IMessage.c File Reference</h1>  </div>
</div>
<div class="contents">

<p>Operations on messages.  
<a href="#_details">More...</a></p>
<code>#include &lt;<a class="el" href="libmapi_8h.html">libmapi/libmapi.h</a>&gt;</code><br/>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#aaee8d68c4a077d4b770e002c266e8fae">AbortSubmit</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_store, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_folder, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#ad59ad3d6701f33687a1eee772bd2bae7">CreateAttach</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_attach)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a88b87869b2957e40c646529d60f49e94">DeleteAttach</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, uint32_t AttachmentID)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a8a43ef79ffa7ec137abccb96aaec9d0d">GetAttachmentTable</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_table)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#ac82c966325e22b50a8275f9da104db3a">GetRecipientTable</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, struct SRowSet *SRowSet, struct SPropTagArray *SPropTagArray)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a158c2a757325b6381c18eb42aec1aa0d">GetValidAttach</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, uint16_t *NumAttachments, uint32_t **AttachmentIds)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a209c992201ffc4da3c4600d3210a8ea1">mapi_recipients_get_org_length</a> (struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *profile)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a1f40cb5f1d4f1a8ef1bed03d95ffc67c">mapi_recipients_RecipientFlags</a> (struct SRow *aRow)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">/details RecipientFlags bitmask calculation for RecipientRows structure.  <a href="#a1f40cb5f1d4f1a8ef1bed03d95ffc67c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a2631355714b42d3d972113372c5175e0">ModifyRecipients</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, struct SRowSet *SRowSet)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a5443c5134f69c4002d564c3aaca61b72">OpenAttach</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, uint32_t AttachmentID, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_attach)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a8502b9418d37081aeeb0a45650517cc2">OpenEmbeddedMessage</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_attach, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_embeddedmsg, enum OpenEmbeddedMessage_OpenModeFlags ulFlags)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a2a6cbb7c5ad01d3d2d83081212b76cb5">ReadRecipients</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, uint32_t RowId, uint8_t *RowCount, struct ReadRecipientRow **RecipientRows)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a7e13dc90e1418e3dbc1c43a0fc7b4410">RemoveAllRecipients</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#ace2cc4cdd5fa5deb9a1d9298e3e3dc5d">SaveChangesMessage</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *parent, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, uint8_t SaveFlags)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#ad3d2a166b8e56d8fb8fa5e71e421a052">SetMessageReadFlag</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_folder, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_child, uint8_t flags)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a4f9d320848d212246eb39cede17c7f2e">SetRecipientType</a> (struct SRow *aRow, enum ulRecipClass RecipClass)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#af34c7e0a7d71c3995616b3ddc1da663c">SubmitMessage</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMessage_8c.html#a9b5ff384790a7ff8daeac09f0e03d010">TransportSend</a> (<a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_message, struct mapi_SPropValue_array *lpProps)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Operations on messages. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="aaee8d68c4a077d4b770e002c266e8fae"></a><!-- doxytag: member="IMessage.c::AbortSubmit" ref="aaee8d68c4a077d4b770e002c266e8fae" args="(mapi_object_t *obj_store, mapi_object_t *obj_folder, mapi_object_t *obj_message)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS AbortSubmit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_store</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_folder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Aborts a previous message submission.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_store</em>&nbsp;</td><td>the store object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>obj_folder</em>&nbsp;</td><td>the folder object where the message has been submitted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the submitted message object</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
<li>MAPI_E_UNABLE_TO_ABORT: The operation can not be aborted</li>
<li>MAPI_E_NOT_IN_QUEUE: The message is no longer in the message store's spooler queue</li>
<li>MAPI_E_NO_SUPPORT: the server object associated with the input handle index in the server object table is not of type Logon or the current logon session is a public logon.</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a26d57152d73d8087c87e705f65691e32">SubmitMessage</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#ad4477e1e7c6dd8314638a9886b570209">mapi_object_get_id()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="ad59ad3d6701f33687a1eee772bd2bae7"></a><!-- doxytag: member="IMessage.c::CreateAttach" ref="ad59ad3d6701f33687a1eee772bd2bae7" args="(mapi_object_t *obj_message, mapi_object_t *obj_attach)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS CreateAttach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_attach</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a new attachment</p>
<p>This function creates a new attachment to an existing message.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message to attach to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>obj_attach</em>&nbsp;</td><td>the attachment</td></tr>
  </table>
  </dd>
</dl>
<p>Both objects need to exist before you call this message. obj_message should be a valid message on the server. obj_attach needs to be initialised.</p>
<div class="fragment"><pre class="fragment">   <span class="keyword">enum</span> MAPISTATUS         retval;
   <a class="code" href="structmapi__object.html">mapi_object_t</a>           obj_message;
   <a class="code" href="structmapi__object.html">mapi_object_t</a>           obj_attach;

   ... open or create the obj_message ...

   <a class="code" href="mapi__object_8c.html#af49c3130b8cb47f741ff652fc53c1364">mapi_object_init</a>(&amp;obj_attach);
   retval = <a class="code" href="IMessage_8c.html#ad59ad3d6701f33687a1eee772bd2bae7">CreateAttach</a>(&amp;obj_message, &amp;obj_attach);
   ... check the <span class="keywordflow">return</span> value ...

   ... use <a class="code" href="IMAPIProp_8c.html#ac1a2bac380d3bec8aec51e883bbc4893">SetProps</a>() to set the attachment up ...
   ... perhaps <a class="code" href="IStream_8c.html#aa89d06db55e3b13241976cf8829f42d7">OpenStream</a>() / <a class="code" href="IStream_8c.html#a0f9d72689923a9b055bf6ef95f83ca20">WriteStream</a>() / <a class="code" href="IStream_8c.html#a1b261910fd70863accbd3dca22145239">CommitStream</a>() on obj_attach ...

   <span class="comment">// Save the changes to the attachment and then the message</span>
   retval = <a class="code" href="IMAPIProp_8c.html#ac2ac74760d05cc2663b5a95c4d57e5e0">SaveChangesAttachment</a>(&amp;obj_message, &amp;obj_attach, KeepOpenReadOnly);
   ... check the return value ...
   retval = <a class="code" href="IMessage_8c.html#ace2cc4cdd5fa5deb9a1d9298e3e3dc5d">SaveChangesMessage</a>(&amp;obj_folder, &amp;obj_message, KeepOpenReadOnly);
   ... check the return value ...
</pre></div><dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#acd2d9aaa13e6138886bacdcea51695d3">CreateMessage</a>, <a class="el" href="proto_8h.html#a3323b8ace0a76a8f9e53aa989bc886c1">GetAttachmentTable</a>, <a class="el" href="proto_8h.html#a8af2fe9cc98605fbda054d3091499ed2">OpenAttach</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapi__object_8c.html#a6cad283dc5a1228734e816adb30aa53c">mapi_object_set_handle()</a>, <a class="el" href="mapi__object_8c.html#a845af67422945480121797b8a44ab14d">mapi_object_set_logon_id()</a>, <a class="el" href="mapi__object_8c.html#a373e9bd46155ea22e816fa66944f22a6">mapi_object_set_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a88b87869b2957e40c646529d60f49e94"></a><!-- doxytag: member="IMessage.c::DeleteAttach" ref="a88b87869b2957e40c646529d60f49e94" args="(mapi_object_t *obj_message, uint32_t AttachmentID)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS DeleteAttach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>AttachmentID</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Delete an attachment from a message</p>
<p>This function deletes one attachment from a message. The attachment to be deleted is specified by its PR_ATTACH_NUM</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message to operate on </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>AttachmentID</em>&nbsp;</td><td>the attachment number</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#acd2d9aaa13e6138886bacdcea51695d3">CreateMessage</a>, <a class="el" href="proto_8h.html#a3323b8ace0a76a8f9e53aa989bc886c1">GetAttachmentTable</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a8a43ef79ffa7ec137abccb96aaec9d0d"></a><!-- doxytag: member="IMessage.c::GetAttachmentTable" ref="a8a43ef79ffa7ec137abccb96aaec9d0d" args="(mapi_object_t *obj_message, mapi_object_t *obj_table)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetAttachmentTable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_table</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve the attachment table for a message</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>obj_table</em>&nbsp;</td><td>the attachment table for the message</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#acd2d9aaa13e6138886bacdcea51695d3">CreateMessage</a>, <a class="el" href="proto_8h.html#a26b91ebe67489ca9e12a2ad1ba71548c">OpenMessage</a>, <a class="el" href="proto_8h.html#a9f7152a9db034fbf7cc7fa8e481bd226">CreateAttach</a>, <a class="el" href="proto_8h.html#a8af2fe9cc98605fbda054d3091499ed2">OpenAttach</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapi__object_8c.html#a6cad283dc5a1228734e816adb30aa53c">mapi_object_set_handle()</a>, <a class="el" href="mapi__object_8c.html#a845af67422945480121797b8a44ab14d">mapi_object_set_logon_id()</a>, <a class="el" href="mapi__object_8c.html#a373e9bd46155ea22e816fa66944f22a6">mapi_object_set_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="ac82c966325e22b50a8275f9da104db3a"></a><!-- doxytag: member="IMessage.c::GetRecipientTable" ref="ac82c966325e22b50a8275f9da104db3a" args="(mapi_object_t *obj_message, struct SRowSet *SRowSet, struct SPropTagArray *SPropTagArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetRecipientTable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct SRowSet *&nbsp;</td>
          <td class="paramname"> <em>SRowSet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct SPropTagArray *&nbsp;</td>
          <td class="paramname"> <em>SPropTagArray</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the message recipient table</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message to receive recipients from </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>SRowSet</em>&nbsp;</td><td>pointer to the recipient table </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>SPropTagArray</em>&nbsp;</td><td>pointer to the array of properties listed in the recipient table</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a26b91ebe67489ca9e12a2ad1ba71548c">OpenMessage</a> </dd></dl>

<p>References <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="structmapi__object.html#af33195293d914107863508deadcfba80">mapi_object::private_data</a>, <a class="el" href="structmapi__obj__message.html#a9455f96c89941bbd9aa13409ae92f9c4">mapi_obj_message::SPropTagArray</a>, and <a class="el" href="structmapi__obj__message.html#ad60765ec77be44b7fcbbbbc8e8211a6d">mapi_obj_message::SRowSet</a>.</p>

</div>
</div>
<a class="anchor" id="a158c2a757325b6381c18eb42aec1aa0d"></a><!-- doxytag: member="IMessage.c::GetValidAttach" ref="a158c2a757325b6381c18eb42aec1aa0d" args="(mapi_object_t *obj_message, uint16_t *NumAttachments, uint32_t **AttachmentIds)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetValidAttach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&nbsp;</td>
          <td class="paramname"> <em>NumAttachments</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t **&nbsp;</td>
          <td class="paramname"> <em>AttachmentIds</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the valid attachment IDs for a message</p>
<p>This function returns the list of valid attachment IDs for a message. You can then use these IDs with the OpenAttach and DeleteAttach functions.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message to operate on </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>NumAttachments</em>&nbsp;</td><td>the number of attachments for the message </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>AttachmentIds</em>&nbsp;</td><td>array of attachment Ids</td></tr>
  </table>
  </dd>
</dl>
<p>The AttachmentIds array has NumAttachments elements.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_INVALID_PARAMETER: a parameter is incorrect (e.g. null pointer)</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a8af2fe9cc98605fbda054d3091499ed2">OpenAttach</a>, <a class="el" href="proto_8h.html#a82fa868e57de4841b97cc4b4e9f6fb8d">DeleteAttach</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a209c992201ffc4da3c4600d3210a8ea1"></a><!-- doxytag: member="IMessage.c::mapi_recipients_get_org_length" ref="a209c992201ffc4da3c4600d3210a8ea1" args="(struct mapi_profile *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t mapi_recipients_get_org_length </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *&nbsp;</td>
          <td class="paramname"> <em>profile</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>References <a class="el" href="structmapi__profile.html#a0d22fa4885a0b8584a3ddaa13de4738a">mapi_profile::mailbox</a>, and <a class="el" href="structmapi__profile.html#aa59e563eab407a53f80ac3841650bfc2">mapi_profile::username</a>.</p>

</div>
</div>
<a class="anchor" id="a1f40cb5f1d4f1a8ef1bed03d95ffc67c"></a><!-- doxytag: member="IMessage.c::mapi_recipients_RecipientFlags" ref="a1f40cb5f1d4f1a8ef1bed03d95ffc67c" args="(struct SRow *aRow)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t mapi_recipients_RecipientFlags </td>
          <td>(</td>
          <td class="paramtype">struct SRow *&nbsp;</td>
          <td class="paramname"> <em>aRow</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>/details RecipientFlags bitmask calculation for RecipientRows structure. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aRow</em>&nbsp;</td><td>pointer to the SRow structures with the properties to pass to ModifyRecipients.</td></tr>
  </table>
  </dd>
</dl>
<p>According to MS-OXCDATA 2.9.3.1 RecipientFlags structure, the bitmask can be represented as the following:</p>
<p>0 3 4 5 6 7 8 9 10 11 15 16 +------+---+---+---+---+---+---+---+---+----------+---+ | Type | E | D | T | S | R | N | U | I | Reserved | O | +------+---+---+---+---+---+---+---+---+----------+---+</p>
<p>Type: (0x7 mask) 3-bit enumeration describing the Address Type (PR_ADDRTYPE) E: (0x8) Email address included (PR_SMTP_ADDRESS) D: (0x10) Display Name included (PR_DISPLAY_NAME) T: (0x20) Transmittable Display Name included (PR_TRANSMITTABLE_DISPLAY_NAME) S: (0x40) If Transmittable Display Name is the same than Display Name (D == T) R: (0x80) Different transport is responsible for delivery N: (0x100) Recipient does not support receiving Rich Text messages U: (0x200) If we are using Unicode properties I: (0x400) If Simple Display Name is included (PR_7BIT_DISPLAY_NAME) Reserved: Must be zero O: (0x8000) Non-standard address type is used</p>
<p>The PidTag property to bitmask mapping was unclear for some fields. mapiproxy between Outlook 2003 and Exchange 2010 has been used for this purpose.</p>
<p>For further information about PidTagAddressType, refer to [MS-OXCMAIL] section 2.1.1.9</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>uint16_t holding the RecipientFlags value. 0 is returned when an inconsistency or a failure occurs </dd></dl>

<p>References <a class="el" href="property_8c.html#a46eadf970c1d4dd029d7ff447d0b0db5">get_SPropValue_SRow()</a>, <a class="el" href="mapitags_8h.html#a1b6c8d8e0c49c0bd28659b24af1b1b0d">PR_7BIT_DISPLAY_NAME</a>, <a class="el" href="mapitags_8h.html#acca09ad57e82ba12e75a6689acc07210">PR_7BIT_DISPLAY_NAME_UNICODE</a>, <a class="el" href="mapitags_8h.html#a8d58f5677ffa09f3c476247624379608">PR_ADDRTYPE</a>, <a class="el" href="mapitags_8h.html#ad35726974f2fbd4ee587202b6f797d31">PR_ADDRTYPE_UNICODE</a>, <a class="el" href="mapitags_8h.html#a449ee8cc69f5b054e2bc95f64d58322f">PR_DISPLAY_NAME</a>, <a class="el" href="mapitags_8h.html#ab7d3fe498c2e4eda89459be027bbef3b">PR_DISPLAY_NAME_UNICODE</a>, <a class="el" href="mapitags_8h.html#addbb6ceee6d65aa21a8204bbf1f21e00">PR_SEND_RICH_INFO</a>, <a class="el" href="mapitags_8h.html#a949494374a7c8443c4e5b510a2662361">PR_SMTP_ADDRESS</a>, <a class="el" href="mapitags_8h.html#a63eca157e115f1d786578eb9b15b2cc6">PR_SMTP_ADDRESS_UNICODE</a>, <a class="el" href="mapitags_8h.html#aed1b625b926182cb71038150b4f09456">PR_TRANSMITTABLE_DISPLAY_NAME</a>, and <a class="el" href="mapitags_8h.html#abc09a95bcb33e97bef21478b0a5857c8">PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE</a>.</p>

<p>Referenced by <a class="el" href="proto_8h.html#a1166925df3bf36ba5bd3835d0917d1df">ModifyRecipients()</a>.</p>

</div>
</div>
<a class="anchor" id="a2631355714b42d3d972113372c5175e0"></a><!-- doxytag: member="IMessage.c::ModifyRecipients" ref="a2631355714b42d3d972113372c5175e0" args="(mapi_object_t *obj_message, struct SRowSet *SRowSet)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ModifyRecipients </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct SRowSet *&nbsp;</td>
          <td class="paramname"> <em>SRowSet</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Adds, deletes or modifies message recipients</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message to change the recipients for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>SRowSet</em>&nbsp;</td><td>the recipients to add</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd>ModifyRecipients can only add recipients.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#acd2d9aaa13e6138886bacdcea51695d3">CreateMessage</a>, <a class="el" href="proto_8h.html#a30175af61e448af11db8ed103bea888c">ResolveNames</a>, <a class="el" href="proto_8h.html#a5667c21307a5a78872d21d86b1161e51">SetRecipientType</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="property_8c.html#af478ffaa186d5c107c1374a0b41d344a">cast_mapi_SPropValue()</a>, <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="property_8c.html#a9b7f82ab0f8700a6ca1b1baf0a1d2d07">find_SPropValue_data()</a>, <a class="el" href="property_8c.html#a8100a61e5a9e28cb327074905a5741d6">get_MAPITAGS_SRow()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="IMessage_8c.html#a1f40cb5f1d4f1a8ef1bed03d95ffc67c">mapi_recipients_RecipientFlags()</a>, <a class="el" href="property_8c.html#aaa27e08be6912277de2076f9cbd6893c">MAPITAGS_delete_entries()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="mapitags_8h.html#a1b6c8d8e0c49c0bd28659b24af1b1b0d">PR_7BIT_DISPLAY_NAME</a>, <a class="el" href="mapitags_8h.html#acca09ad57e82ba12e75a6689acc07210">PR_7BIT_DISPLAY_NAME_UNICODE</a>, <a class="el" href="mapitags_8h.html#a8d58f5677ffa09f3c476247624379608">PR_ADDRTYPE</a>, <a class="el" href="mapitags_8h.html#aa0783dd49fbe0f4e84356b830f408bc5">PR_ADDRTYPE_ERROR</a>, <a class="el" href="mapitags_8h.html#ad35726974f2fbd4ee587202b6f797d31">PR_ADDRTYPE_UNICODE</a>, <a class="el" href="mapitags_8h.html#a449ee8cc69f5b054e2bc95f64d58322f">PR_DISPLAY_NAME</a>, <a class="el" href="mapitags_8h.html#aa4bc5eb018a67d03899655b6c4ea2cda">PR_DISPLAY_NAME_ERROR</a>, <a class="el" href="mapitags_8h.html#ab7d3fe498c2e4eda89459be027bbef3b">PR_DISPLAY_NAME_UNICODE</a>, <a class="el" href="mapitags_8h.html#a4c49a30b3d419314ad0a04134dfc2533">PR_EMAIL_ADDRESS</a>, <a class="el" href="mapitags_8h.html#a781db3191ae7007b8158d305b80ee2af">PR_EMAIL_ADDRESS_UNICODE</a>, <a class="el" href="mapitags_8h.html#a5930bac942504b6a4e0f80089137ccf3">PR_ENTRYID</a>, <a class="el" href="mapitags_8h.html#ad60d53203e2bf2d7a341a32b136d3c87">PR_GIVEN_NAME</a>, <a class="el" href="mapitags_8h.html#a6c65471df9dbf816da8fdb6455820747">PR_GIVEN_NAME_ERROR</a>, <a class="el" href="mapitags_8h.html#a30ddc33965d60a2e8907755cdea5c00b">PR_GIVEN_NAME_UNICODE</a>, <a class="el" href="mapitags_8h.html#a6b3a4f3b23a135557a812d675c0ed8a0">PR_RECIPIENT_TYPE</a>, <a class="el" href="mapitags_8h.html#a09353df3dd54a714e4b3999beee232c2">PR_SEND_INTERNET_ENCODING</a>, <a class="el" href="mapitags_8h.html#ac1ac45ca9f1e296ab548ad751c109585">PR_SEND_INTERNET_ENCODING_ERROR</a>, <a class="el" href="mapitags_8h.html#addbb6ceee6d65aa21a8204bbf1f21e00">PR_SEND_RICH_INFO</a>, <a class="el" href="mapitags_8h.html#a2d12aa5682bcdf3961cf541a421da38e">PR_SEND_RICH_INFO_ERROR</a>, <a class="el" href="mapitags_8h.html#a949494374a7c8443c4e5b510a2662361">PR_SMTP_ADDRESS</a>, <a class="el" href="mapitags_8h.html#a63eca157e115f1d786578eb9b15b2cc6">PR_SMTP_ADDRESS_UNICODE</a>, <a class="el" href="mapitags_8h.html#aed1b625b926182cb71038150b4f09456">PR_TRANSMITTABLE_DISPLAY_NAME</a>, and <a class="el" href="mapitags_8h.html#abc09a95bcb33e97bef21478b0a5857c8">PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE</a>.</p>

</div>
</div>
<a class="anchor" id="a5443c5134f69c4002d564c3aaca61b72"></a><!-- doxytag: member="IMessage.c::OpenAttach" ref="a5443c5134f69c4002d564c3aaca61b72" args="(mapi_object_t *obj_message, uint32_t AttachmentID, mapi_object_t *obj_attach)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS OpenAttach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>AttachmentID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_attach</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Open an attachment to a message</p>
<p>This function opens one attachment from a message. The attachment to be opened is specified by its PR_ATTACH_NUM.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message to operate on </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>AttachmentID</em>&nbsp;</td><td>the attachment number </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>obj_attach</em>&nbsp;</td><td>the resulting attachment object</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#acd2d9aaa13e6138886bacdcea51695d3">CreateMessage</a>, <a class="el" href="proto_8h.html#a9f7152a9db034fbf7cc7fa8e481bd226">CreateAttach</a>, <a class="el" href="proto_8h.html#a3323b8ace0a76a8f9e53aa989bc886c1">GetAttachmentTable</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapi__object_8c.html#a6cad283dc5a1228734e816adb30aa53c">mapi_object_set_handle()</a>, <a class="el" href="mapi__object_8c.html#a845af67422945480121797b8a44ab14d">mapi_object_set_logon_id()</a>, <a class="el" href="mapi__object_8c.html#a373e9bd46155ea22e816fa66944f22a6">mapi_object_set_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a8502b9418d37081aeeb0a45650517cc2"></a><!-- doxytag: member="IMessage.c::OpenEmbeddedMessage" ref="a8502b9418d37081aeeb0a45650517cc2" args="(mapi_object_t *obj_attach, mapi_object_t *obj_embeddedmsg, enum OpenEmbeddedMessage_OpenModeFlags ulFlags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS OpenEmbeddedMessage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_attach</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_embeddedmsg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum OpenEmbeddedMessage_OpenModeFlags&nbsp;</td>
          <td class="paramname"> <em>ulFlags</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Opens an embedded message object and retrieves a MAPI object that can be used to get or set properties on the embedded message.</p>
<p>This function essentially takes an attachment and gives you back a message.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_attach</em>&nbsp;</td><td>the attachment object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>obj_embeddedmsg</em>&nbsp;</td><td>the embedded message </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ulFlags</em>&nbsp;</td><td>access rights on the embedded message</td></tr>
  </table>
  </dd>
</dl>
<p>Possible ulFlags values:</p>
<ul>
<li>0x0: read only access</li>
<li>0x1: Read / Write access</li>
<li>0x2: Create</li>
</ul>
<div class="fragment"><pre class="fragment">        ... assume we have a message - obj_message ...
        <span class="comment">// Initialise the attachment object</span>
        <a class="code" href="mapi__object_8c.html#af49c3130b8cb47f741ff652fc53c1364">mapi_object_init</a>(&amp;obj_attach);

        <span class="comment">// Create an attachment to the message</span>
        retval = <a class="code" href="IMessage_8c.html#ad59ad3d6701f33687a1eee772bd2bae7">CreateAttach</a>(&amp;obj_message, &amp;obj_attach);
        ... check the <span class="keywordflow">return</span> value ...

        <span class="comment">// use SetProps() to set the attachment up, noting the special PR_ATTACHM_METHOD property</span>
        attach[0].ulPropTag = PR_ATTACH_METHOD;
        attach[0].value.l = ATTACH_EMBEDDED_MSG;
        attach[1].ulPropTag = PR_RENDERING_POSITION;
        attach[1].value.l = 0;
        retval = <a class="code" href="IMAPIProp_8c.html#ac1a2bac380d3bec8aec51e883bbc4893">SetProps</a>(&amp;obj_attach, attach, 2);
        ... check the <span class="keywordflow">return</span> value ...

        <span class="comment">// Initialise the embedded message object</span>
        <a class="code" href="mapi__object_8c.html#af49c3130b8cb47f741ff652fc53c1364">mapi_object_init</a>(&amp;obj_embeddedmsg);
        retval = <a class="code" href="IMessage_8c.html#a8502b9418d37081aeeb0a45650517cc2">OpenEmbeddedMessage</a>(&amp;obj_attach, &amp;obj_embeddedmsg, <a class="code" href="mapidefs_8h.html#ad98c394dc6d4caea61b97f60f2532e4a">MAPI_CREATE</a>);
        ... check the <span class="keywordflow">return</span> value ...

        <span class="comment">// Fill in the embedded message properties, just like any other message (e.g. resulting from CreateMessage())</span>

        <span class="comment">// Save the changes to the embedded message</span>
        retval = <a class="code" href="IMessage_8c.html#ace2cc4cdd5fa5deb9a1d9298e3e3dc5d">SaveChangesMessage</a>(&amp;obj_message, &amp;obj_embeddedmsg, KeepOpenReadOnly);
        ... check the <span class="keywordflow">return</span> value ...

        <span class="comment">// Save the changes to the attachment</span>
        retval = <a class="code" href="IMAPIProp_8c.html#ac2ac74760d05cc2663b5a95c4d57e5e0">SaveChangesAttachment</a>(&amp;obj_message, &amp;obj_attach, KeepOpenReadOnly);
        ... check the <span class="keywordflow">return</span> value ...

        <span class="comment">// Save the changes to the original message</span>
        retval = <a class="code" href="IMessage_8c.html#ace2cc4cdd5fa5deb9a1d9298e3e3dc5d">SaveChangesMessage</a>(&amp;obj_folder, &amp;obj_message, KeepOpenReadOnly);
        ... check the <span class="keywordflow">return</span> value ...
</pre></div><dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_INVALID_PARAMETER: obj_store is undefined</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a9f7152a9db034fbf7cc7fa8e481bd226">CreateAttach</a>, <a class="el" href="proto_8h.html#a26b91ebe67489ca9e12a2ad1ba71548c">OpenMessage</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__obj__message.html#a0ac376ea28f3174fdd541f78c0dfd539">mapi_obj_message::cValues</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#a63a938e21037ec27d8103e517193c5d0">emsmdb_get_SRow()</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a959500d050843deb2da3ed0537471b8f">mapi_ctx::lp_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapi__object_8c.html#a6cad283dc5a1228734e816adb30aa53c">mapi_object_set_handle()</a>, <a class="el" href="mapi__object_8c.html#a845af67422945480121797b8a44ab14d">mapi_object_set_logon_id()</a>, <a class="el" href="mapi__object_8c.html#a373e9bd46155ea22e816fa66944f22a6">mapi_object_set_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="mapitags_8h.html#af1e41674611c2fa37189850b87bc91e0">PR_INTERNET_CPID</a>, <a class="el" href="mapitags_8h.html#a6b3a4f3b23a135557a812d675c0ed8a0">PR_RECIPIENT_TYPE</a>, <a class="el" href="structmapi__object.html#af33195293d914107863508deadcfba80">mapi_object::private_data</a>, <a class="el" href="property_8c.html#a32a65292c776e8d0dfca51e404e6936d">SPropTagArray_add()</a>, <a class="el" href="property_8c.html#a6d194c81bb999f8cf188e8afc164c153">SRow_addprop()</a>, and <a class="el" href="structmapi__obj__message.html#ad60765ec77be44b7fcbbbbc8e8211a6d">mapi_obj_message::SRowSet</a>.</p>

</div>
</div>
<a class="anchor" id="a2a6cbb7c5ad01d3d2d83081212b76cb5"></a><!-- doxytag: member="IMessage.c::ReadRecipients" ref="a2a6cbb7c5ad01d3d2d83081212b76cb5" args="(mapi_object_t *obj_message, uint32_t RowId, uint8_t *RowCount, struct ReadRecipientRow **RecipientRows)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ReadRecipients </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>RowId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>RowCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct ReadRecipientRow **&nbsp;</td>
          <td class="paramname"> <em>RecipientRows</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read Recipients from a message</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message we want to read recipients from </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>RowId</em>&nbsp;</td><td>the row index we start reading recipients from </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>RowCount</em>&nbsp;</td><td>pointer on the number of recipients </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>RecipientRows</em>&nbsp;</td><td>pointer on the recipients array</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a1166925df3bf36ba5bd3835d0917d1df">ModifyRecipients</a>, <a class="el" href="proto_8h.html#ae625b8aeb2972e53df4608791fc77861">RemoveAllRecipients</a>, <a class="el" href="proto_8h.html#a1146a61a323ecd24e3ecb8c826d3c372">GetRecipientTable</a>, <a class="el" href="proto_8h.html#a26b91ebe67489ca9e12a2ad1ba71548c">OpenMessage</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a7e13dc90e1418e3dbc1c43a0fc7b4410"></a><!-- doxytag: member="IMessage.c::RemoveAllRecipients" ref="a7e13dc90e1418e3dbc1c43a0fc7b4410" args="(mapi_object_t *obj_message)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS RemoveAllRecipients </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Deletes all recipients from a message</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message we want to remove all recipients from</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a1166925df3bf36ba5bd3835d0917d1df">ModifyRecipients</a>, <a class="el" href="proto_8h.html#a6bc72b5c38aa15725d1454ad2c3635d0">ReadRecipients</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="ace2cc4cdd5fa5deb9a1d9298e3e3dc5d"></a><!-- doxytag: member="IMessage.c::SaveChangesMessage" ref="ace2cc4cdd5fa5deb9a1d9298e3e3dc5d" args="(mapi_object_t *parent, mapi_object_t *obj_message, uint8_t SaveFlags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS SaveChangesMessage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>SaveFlags</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Saves all changes to the message</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td>the parent object for the message </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message to save </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>SaveFlags</em>&nbsp;</td><td>specify how the save operation behaves</td></tr>
  </table>
  </dd>
</dl>
<p>Possible value for SaveFlags:</p>
<ol type="1">
<li>KeepReadOnly Keep the Message object open with read-only access</li>
<li>KeepOpenReadWrite Keep the Message object open with read-write access</li>
<li>ForceSave Commit the changes and keep the message object open with read-write access</li>
</ol>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a0ddd5dd9827db2d23d94440042abab37">SetProps</a>, <a class="el" href="proto_8h.html#a1166925df3bf36ba5bd3835d0917d1df">ModifyRecipients</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapi__object_8c.html#a87947ae1569ed162473811bb257922cb">mapi_object_set_id()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="ad3d2a166b8e56d8fb8fa5e71e421a052"></a><!-- doxytag: member="IMessage.c::SetMessageReadFlag" ref="ad3d2a166b8e56d8fb8fa5e71e421a052" args="(mapi_object_t *obj_folder, mapi_object_t *obj_child, uint8_t flags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS SetMessageReadFlag </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_folder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_child</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Clear or set the MSGFLAG_READ flag for a given message</p>
<p>This function clears or sets the MSGFLAG_READ flag in the PR_MESSAGE_FLAGS property of a given message.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_folder</em>&nbsp;</td><td>the folder to operate in </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>obj_child</em>&nbsp;</td><td>the message to set flags on </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>the new flags (MSGFLAG_READ) value</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a26b91ebe67489ca9e12a2ad1ba71548c">OpenMessage</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a4f9d320848d212246eb39cede17c7f2e"></a><!-- doxytag: member="IMessage.c::SetRecipientType" ref="a4f9d320848d212246eb39cede17c7f2e" args="(struct SRow *aRow, enum ulRecipClass RecipClass)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS SetRecipientType </td>
          <td>(</td>
          <td class="paramtype">struct SRow *&nbsp;</td>
          <td class="paramname"> <em>aRow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum ulRecipClass&nbsp;</td>
          <td class="paramname"> <em>RecipClass</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the type of a recipient</p>
<p>The function sets the recipient type (RecipClass) in the aRow parameter. ResolveNames should be used to fill the SRow structure.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aRow</em>&nbsp;</td><td>the row to set </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>RecipClass</em>&nbsp;</td><td>the type of recipient to set on the specified row</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_INVALID_PARAMETER: The aRow parameter was not set properly.</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a30175af61e448af11db8ed103bea888c">ResolveNames</a>, <a class="el" href="proto_8h.html#a1166925df3bf36ba5bd3835d0917d1df">ModifyRecipients</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, and <a class="el" href="property_8c.html#a6d194c81bb999f8cf188e8afc164c153">SRow_addprop()</a>.</p>

</div>
</div>
<a class="anchor" id="af34c7e0a7d71c3995616b3ddc1da663c"></a><!-- doxytag: member="IMessage.c::SubmitMessage" ref="af34c7e0a7d71c3995616b3ddc1da663c" args="(mapi_object_t *obj_message)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS SubmitMessage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Saves all changes to the message and marks it as ready for sending.</p>
<p>This function saves all changes made to a message and marks it ready to be sent.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj_message</em>&nbsp;</td><td>the message to mark complete</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li>
<li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#acd2d9aaa13e6138886bacdcea51695d3">CreateMessage</a>, <a class="el" href="proto_8h.html#a0ddd5dd9827db2d23d94440042abab37">SetProps</a>, <a class="el" href="proto_8h.html#a1166925df3bf36ba5bd3835d0917d1df">ModifyRecipients</a>, <a class="el" href="proto_8h.html#a5667c21307a5a78872d21d86b1161e51">SetRecipientType</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a9b5ff384790a7ff8daeac09f0e03d010"></a><!-- doxytag: member="IMessage.c::TransportSend" ref="a9b5ff384790a7ff8daeac09f0e03d010" args="(mapi_object_t *obj_message, struct mapi_SPropValue_array *lpProps)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS TransportSend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mapi_SPropValue_array *&nbsp;</td>
          <td class="paramname"> <em>lpProps</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sends the specified Message object out for message delivery. </p>

<p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#aa94645f34e6c4bf1c0631dffb0742676">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c.html#a96bfa7545b6e9ad350c42ba0abd07da8">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c.html#ae5ef3137838fbc0c3eaedd7da99f8adc">mapi_object_get_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
</div>
</div>
<br/>
<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#f8f8f8; border:2px solid #e0e0e0; padding:5px;">
<tr>
<td> 
  <img alt="Creative Commons License" src="CC_SomeRightsReserved.png" width="90" height="30" border="0" /><br />
  <img alt="Creative Commons Attribution icon" src="24px-Cc-by_white.svg.png" width="24" height="24" border="0" />
  <img alt="Creative Commons Share Alike icon" src="24px-Cc-sa_white.svg.png" width="24" height="24" border="0" />
</td>
<td> <i><strong class="selflink">This content</strong> is licensed under the Creative Commons<br />
Attribution ShareAlike License v. 3.0:<br />
<a href="http://creativecommons.org/licenses/by-sa/3.0/" class="external free" title="http://creativecommons.org/licenses/by-sa/3.0/" rel="nofollow">http://creativecommons.org/licenses/by-sa/3.0/</a></i>
</td></tr></table>
<br/>
</div>
</div>
</body>
</html>