1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638
|
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>
<title>mail::folder::addMessage</title>
<link rel="stylesheet" href="manpage.css" type="text/css"/>
<link rel="home" href="index.html" title="Cone: COnsole Newsreader And Emailer"/>
<link rel="up" href="libmail-folder.html" title="mail::folder Native API reference"/>
<link rel="prev" href="libmail-folder.html" title="mail::folder Native API reference"/>
<link rel="next" href="folder-clone.html" title="mail::folder::clone"/>
<link xmlns="" rel="icon" href="icon.gif" type="image/gif"/>
<meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/>
<!--
Copyright 2002 - 2007 Double Precision, Inc. See COPYING for distribution
information.
-->
</head>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center" rowspan="1">
mail::folder::addMessage</th>
</tr>
<tr>
<td width="20%" align="left" rowspan="1" colspan="1">
<a accesskey="p" href="libmail-folder.html" shape="rect">Prev</a> </td>
<th width="60%" align="center" rowspan="1" colspan="1">
<span class="structname">mail::folder</span> Native API
reference</th>
<td width="20%" align="right" rowspan="1" colspan="1">
 <a accesskey="n" href="folder-clone.html" shape="rect">Next</a></td>
</tr>
</table>
<hr/>
</div>
<div class="refentry" title="mail::folder::addMessage">
<a id="folder-addmessage" shape="rect" name="folder-addmessage"> </a>
<div class="titlepage"/>
<div class="refnamediv">
<h2>Name</h2>
<p>mail::folder::addMessage — Add a message to a
folder</p>
</div>
<div class="refsynopsisdiv" title="Synopsis">
<h2>Synopsis</h2>
<div class="literallayout">
<p><br clear="none"/>
<br clear="none"/>
<br clear="none"/>
<br clear="none"/>
#include <libmail/mail.H><br clear="none"/>
<br clear="none"/>
<br clear="none"/>
class myCallback : public mail::callback {<br clear="none"/>
public:<br clear="none"/>
    void success(std::string msg);<br clear="none"/>
    void fail(std::string msg);<br clear="none"/>
};<br clear="none"/></p>
</div>
<div class="literallayout">
<p><br clear="none"/>
#include <libmail/addmessage.H><br clear="none"/>
<br clear="none"/>
mail::folder *folder;<br clear="none"/>
time_t messageDate;<br clear="none"/>
mail::messageInfo newMessageInfo;<br clear="none"/>
std::string messageBody;<br clear="none"/></p>
</div>
<div class="funcsynopsis">
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
<tr>
<td rowspan="1" colspan="1"><code class="funcdef">mail::addMessage *msg=folder-><b class="fsfunc">addMessage</b>(</code></td>
<td rowspan="1" colspan="1">myCallback &<var class="pdparam">callback</var><code>)</code>;</td>
</tr>
</table>
<div class="funcprototype-spacer">
 
</div>
</div>
<div class="literallayout">
<p><br clear="none"/>
msg->messageDate=messageDate;<br clear="none"/>
msg->messageInfo=messageInfo;<br clear="none"/>
msg->saveMessageContents(messageBody);<br clear="none"/>
<br clear="none"/>
if (changedMyMind)<br clear="none"/>
    msg->fail(std::string errmsg);<br clear="none"/>
else<br clear="none"/>
    msg->go();<br clear="none"/></p>
</div>
</div>
<div class="refsect1" title="USAGE">
<a id="id578132" shape="rect" name="id578132"> </a>
<h2>USAGE</h2>
<p>This method begins the process of manually adding a
message to a folder. The <code class="function">mail::folder::addMessage</code> method returns a
pointer to a <span class="structname">mail::addMessage</span>
object. The application should then define the contents of
the message by invoking the object's <code class="function">saveMessageContents</code> method. The entire
contents of the message does not have to be specified at
once. A large message may be defined by repeatedly invoking
<code class="function">saveMessageContents</code>,
consecutively, each time specifying the next portion of the
message's contents.</p>
<p>After the contents of the message are defined by invoking
<code class="function">saveMessageContents</code>, the
application must invoke the <code class="function">go</code>
method in order to actually place the new message into the
folder. The application may abort the process at any time by
invoking the <code class="function">fail</code> method, and
specifying the error message.</p>
<p>The application does not need to explicitly destroy the
<span class="structname">mail::addMessage</span> object, the
object is automatically destroyed by <code class="function">go</code> or <code class="function">fail</code>.</p>
<p>The application may set the following <span class="structname">mail::addMessage</span> fields prior to invoking
<code class="function">go</code>. If not initialized, the
following fields will be set to their default values.</p>
<div class="variablelist">
<dl>
<dt><span class="term">messageDate</span></dt>
<dd>
<p>The message's timestamp, as retrieved by
<code class="literal">mail::account::ARRIVALDATE</code>
parameter to <a class="link" href="mail-readmsgattr.html" title="mail::account::readMessageAttributes" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::readMessageAttributes</span>(3x)</span></a>().</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>This timestamp does not necessarily have to be the
same as the timestamp in the message's <code class="literal">Date:</code> header.</p>
</div>
</dd>
<dt><span class="term">messageInfo</span></dt>
<dd>
<p>The message flags, as returned by <a class="link" href="mail-getfolderindexinfo.html" title="mail::account::getFolderIndexInfo" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::getFolderIndexInfo</span>(3x)</span></a>().</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>The contents of <em class="structfield"><code>uid</code></em>, the message's
unique ID, are ignored, only the message flags in
<em class="structfield"><code>messageInfo</code></em>
are read. The message gets automatically assigned a
new unique ID when it gets added to the folder.</p>
</div>
</dd>
</dl>
</div>
</div>
<div class="refsect1" title="MIME-BASED MESSAGE COMPOSITION">
<a id="id578314" shape="rect" name="id578314"> </a>
<h2>MIME-BASED MESSAGE COMPOSITION</h2>
<div class="literallayout">
<p><br clear="none"/>
<br clear="none"/>
<br clear="none"/>
<br clear="none"/>
#include <libmail/mail.H><br clear="none"/>
<br clear="none"/>
<br clear="none"/>
class myCallback : public mail::callback {<br clear="none"/>
public:<br clear="none"/>
    void success(std::string msg);<br clear="none"/>
    void fail(std::string msg);<br clear="none"/>
};<br clear="none"/></p>
</div>
<div class="funcsynopsis">
<pre class="funcsynopsisinfo" xml:space="preserve">
mail::addMessage *msg;
</pre>
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
<tr>
<td rowspan="1" colspan="1"><code class="funcdef">msg-><b class="fsfunc">assembleContent</b>(</code></td>
<td rowspan="1" colspan="1">size_t &<var class="pdparam">handleRet</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">const mail::Attachment
&<var class="pdparam">attachment</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">mail::callback
&<var class="pdparam">cb</var><code>)</code>;</td>
</tr>
</table>
<div class="funcprototype-spacer">
 
</div>
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
<tr>
<td rowspan="1" colspan="1"><code class="funcdef">msg-><b class="fsfunc">assembleMessageRfc822</b>(</code></td>
<td rowspan="1" colspan="1">size_t &<var class="pdparam">handleRet</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">std::string <var class="pdparam">headers</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">size_t <var class="pdparam">handle</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">mail::callback
&<var class="pdparam">cb</var><code>)</code>;</td>
</tr>
</table>
<div class="funcprototype-spacer">
 
</div>
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
<tr>
<td rowspan="1" colspan="1"><code class="funcdef">msg-><b class="fsfunc">assembleMultipart</b>(</code></td>
<td rowspan="1" colspan="1">size_t &<var class="pdparam">handleRet</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">std::string <var class="pdparam">headers</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">const
std::vector<size_t> <var class="pdparam">parts</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">std::string <var class="pdparam">multipart_type</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">const
mail::mimestruct::parameterList &<var class="pdparam">options</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">mail::callback
&<var class="pdparam">cb</var><code>)</code>;</td>
</tr>
</table>
<div class="funcprototype-spacer">
 
</div>
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
<tr>
<td rowspan="1" colspan="1"><code class="funcdef">bool
flag=msg-><b class="fsfunc">assemble</b>(</code></td>
<td rowspan="1" colspan="1"><code>void)</code>;</td>
<td rowspan="1" colspan="1"> </td>
</tr>
</table>
<div class="funcprototype-spacer">
 
</div>
</div>
<p>This is an alternative way of adding a message to a folder
by assembling it one MIME section at a time. First, use the
<code class="function">assembleContent</code> method to
specify the individual content-containing (non-<code class="literal">multipart</code> and non-<code class="literal">message/rfc822</code>) MIME sections. Before
<code class="function">assembleContent</code> invokes
<em class="parameter"><code>cb</code></em>'s <code class="function">success</code> method it will initialize
<em class="parameter"><code>handleRet</code></em> with a
<span class="quote">“<span class="quote">handle</span>”</span> that refers to this MIME
section. Use these MIME section handles to assemble the
individual MIME sections into <code class="literal">multipart</code> and <code class="literal">message/rfc822</code> MIME sections. The
<code class="function">assembleMessageRfc822</code> and
<code class="function">assembleMultipart</code> methods also
create a new MIME section handle, which refers to the
assembled MIME section, in the same way. Those handles
themselves may also be re-assembled into higher-level
<code class="literal">multipart</code> or <code class="literal">message/rfc822</code> MIME sections.</p>
<p>Finally, after defining the topmost MIME section, use
<code class="function">assemble</code> to assemble the entire
message. If <code class="function">assemble</code> returns
<code class="literal">true</code>, use the <code class="function">go</code> (or the <code class="function">fail</code>) method. If <code class="function">assemble</code> returns <code class="literal">false</code>, an <code class="literal">errno</code>-related error has occured; the
application should call <code class="function">fail</code> to
report it, and clean up the <span class="structname">mail::addMessage</span> object.</p>
<p>The <code class="function">assembleContent</code> method
receives a <a class="link" href="mail-attachments.html" title="mail::Attachment" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::Attachment</span>(3x)</span></a>
object.</p>
<p>The second parameter to <code class="function">assembleMessageRfc822</code> are the MIME headers
of the <code class="literal">message/rfc822</code>
attachment. The MIME headers must be terminated by a single
newline character, and include the <code class="literal">Content-Type</code> header. In nearly all
situations, this parameter should be set to the fixed string
<span class="quote">“<span class="quote">Content-Type:
message/rfc822\n</span>”</span> (note the trailing
newline). The third parameter is the handle of the
attachment's top-level MIME section.</p>
<p>The second parameter to <code class="function">assembleMultipart</code> is a string containing
MIME headers for the multipart MIME section. These headers
should <span class="emphasis"><em>not</em></span> include the
<code class="literal">Content-Type</code> header. The
<code class="literal">Content-Type</code> header for the
multipart section will be generated internally. If there are
any extra headers, they must have a single trailing newline
character. Most situations do not need extra headers, so this
parameter should be an empty string, <span class="quote">“”</span>.</p>
<p>The third parameter to <code class="function">assembleMultipart</code> is the vector of
previously-defined handles of each MIME section that's to be
assembled into a multipart MIME section. The fourth parameter
is the actual MIME type of this section, usually <span class="quote">“<span class="quote">multipart/mixed</span>”</span> or <span class="quote">“<span class="quote">multipart/alternative</span>”</span> (any
<span class="quote">“<span class="quote">multipart</span>”</span> type is allowed). The
fifth parameter is optional, and specifies the MIME content
type parameter list (the parameter list should not include
the <span class="quote">“<span class="quote">boundary</span>”</span> parameter, because it's
taken care of automatically by this function).</p>
<p>The last parameter to <code class="function">assembleContent</code>, <code class="function">assembleMessageRfc822</code>, or <code class="function">assembleMultipart</code> is the callback object.
The callback object's <code class="function">success</code>
method will be invoked when the MIME section has been
assembled. The <code class="function">fail</code> method will
be invoked if an error occured. Depending on the type of the
folder the message is being added to, the MIME section may be
assembled immediately (in which case <code class="function">success</code> or <code class="function">fail</code> gets called right before the function
terminates) or the function will terminate immediately, and
the callback function will be called at a later time.</p>
<div class="refsect2" title="COPYING ATTACHMENTS FROM OTHER MESSAGES">
<a id="id578817" shape="rect" name="id578817"> </a>
<h3>COPYING ATTACHMENTS FROM OTHER MESSAGES</h3>
<div class="funcsynopsis">
<pre class="funcsynopsisinfo" xml:space="preserve">
mail::addMessage *msg;
</pre>
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
<tr>
<td rowspan="1" colspan="1"><code class="funcdef">msg-><b class="fsfunc">assembleImportAttachment</b>(</code></td>
<td rowspan="1" colspan="1">size_t &<var class="pdparam">handleRet</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">mail::account
*<var class="pdparam">acct</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">std::string <var class="pdparam">uid</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">const mail::mimestruct
&<var class="pdparam">attachment</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">mail::callback
&<var class="pdparam">cb</var><code>)</code>;</td>
</tr>
</table>
<div class="funcprototype-spacer">
 
</div>
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
<tr>
<td rowspan="1" colspan="1"><code class="funcdef">msg-><b class="fsfunc">assembleRemoveAttachmentsFrom</b>(</code></td>
<td rowspan="1" colspan="1">size_t &<var class="pdparam">handleRet</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">mail::account
*<var class="pdparam">acct</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">std::string <var class="pdparam">uid</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">const mail::mimestruct
&<var class="pdparam">attachment</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">const std::set
&<var class="pdparam">mimeIdList</var>,</td>
</tr>
<tr>
<td rowspan="1" colspan="1"> </td>
<td rowspan="1" colspan="1">mail::callback
&<var class="pdparam">cb</var><code>)</code>;</td>
</tr>
</table>
<div class="funcprototype-spacer">
 
</div>
</div>
<p>The <code class="function">assembleImportAttachment</code> function
assembles a new MIME section by copying an existing MIME
section from another message. <em class="parameter"><code>acct</code></em> specifies an open mail
account, with an open mail folder. <em class="parameter"><code>uid</code></em> specifies the unique
identifier of a message in <em class="parameter"><code>acct</code></em>'s open folder, which can
be obtained from <a class="link" href="mail-getfolderindexinfo.html" title="mail::account::getFolderIndexInfo" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::getFolderIndexInfo</span>(3x)</span></a>.
<em class="parameter"><code>attachment</code></em>
specifies which attachment in message <em class="parameter"><code>uid</code></em> should be copied.
<em class="parameter"><code>attachment</code></em> must be
obtained using <code class="literal">mail::account::MIMESTRUCTURE</code> with
<a class="link" href="mail-readmsgattr.html" title="mail::account::readMessageAttributes" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::readMessageAttributes</span>(3x)</span></a>.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p><em class="parameter"><code>acct</code></em> can refer
to any open mail account or folder, and does not have to
be the same folder the message is being added to!</p>
</div>
<p><em class="parameter"><code>attachment</code></em> may
refer to a multipart, or a non-multipart MIME section. An
<em class="parameter"><code>attachment</code></em>
referring to a multipart MIME section imports the entire
multipart MIME section, and all subsections it contains.
<code class="function">assembleRemoveAttachmentsFrom</code>
also copies the entire multipart MIME section, but skips
selected MIME subsections. Any subsection appearing in
<em class="parameter"><code>mimeIdList</code></em> is not
copied. <em class="parameter"><code>mimeIdList</code></em>
is a list of MIME section identifiers, obtained from
<a class="link" href="mimestruct.html" title="mail::mimestruct" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::mimestruct</span>(3x)</span></a>'s
<em class="structfield"><code>mime_id</code></em>
field.</p>
<p><code class="function">assembleRemoveAttachmentsFrom</code> implements
the <span class="quote">“<span class="quote">Remove
Attachments</span>”</span> function in a typical mail
client, which removes individual attachments from a
message. To do that, set <em class="parameter"><code>attachment</code></em> to the top-level
MIME section that refers to the entire message (literally
the same object returned by <a class="link" href="mail-readmsgattr.html" title="mail::account::readMessageAttributes" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::readMessageAttributes</span>(3x)</span></a>)
and specify the attachments to remove in <em class="parameter"><code>mimeIdList</code></em>. Use <span class="citerefentry"><span class="refentrytitle">mail::folder::addMessage</span>(3x)</span>
to add the message to the same folder as the original
message (this must be done before invoking <code class="function">assembleRemoveAttachmentsFrom</code>, of
course), then when that's done remove the original
message.</p>
</div>
</div>
<div class="refsect1" title="RETURN CODES AND CALLBACKS">
<a id="id579148" shape="rect" name="id579148"> </a>
<h2>RETURN CODES AND CALLBACKS</h2>
<p><code class="function">mail::addMessage::fail</code>
automatically invokes the callback object's <code class="function">fail</code> method, prior to returning.
<code class="function">mail::addMessage::go</code>
automatically invokes the callback object's <code class="function">success</code> method, when the message is added.
<code class="function">mail::addMessage::go</code> will
invoke <code class="function">fail</code> if the message
cannot be added to the folder, for some reason.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>The <code class="function">mail::folder::addMessage</code> function returns
a NULL pointer if the <span class="structname">mail::addMessage</span> object cannot be
created. This does not necessarily indicate an
out-of-memory condition. It is not possible to manually add
messages to some types of folders. For example, messages
cannot be manually added to POP3 folders, since this is not
supported by the POP3 protocol.</p>
<p>The callback object's <code class="function">fail</code>
method gets invoked just prior to this function returning
NULL, in these kinds of situations.</p>
</div>
<p>The application must wait until <em class="parameter"><code>callback</code></em>'s <code class="function">success</code> or <code class="function">fail</code> method is invoked. The <code class="function">success</code> method is invoked when this request
is succesfully processed. The <code class="function">fail</code> method is invoked if this request
cannot be processed. The application must not destroy
<em class="parameter"><code>callback</code></em> until either
the <code class="function">success</code> or <code class="function">fail</code> method is invoked.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p><em class="parameter"><code>callback</code></em>'s
<code class="function">fail</code> method may be invoked
even after other callback methods were invoked. This
indicates that the request was partially completed before
the error was encountered.</p>
</div>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p><em class="parameter"><code>folder</code></em> does not
necessarily have to be a <span class="structname">mail::folder</span> object that refers to the
currently open folder. Any <span class="structname">mail::folder</span> object from an active
<span class="structname">mail::account</span> object may be
used.</p>
</div>
</div>
<div class="refsect1" title="SEE ALSO">
<a id="id579334" shape="rect" name="id579334"> </a>
<h2>SEE ALSO</h2>
<p><a class="link" href="mail-getfolderindexinfo.html" title="mail::account::getFolderIndexInfo" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::getFolderIndexInfo</span>(3x)</span></a>(),
<a class="link" href="mail-readmsgattr.html" title="mail::account::readMessageAttributes" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::readMessageAttributes</span>(3x)</span></a>().</p>
</div>
</div>
<div class="navfooter">
<hr/>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left" rowspan="1" colspan="1">
<a accesskey="p" href="libmail-folder.html" shape="rect">Prev</a> </td>
<td width="20%" align="center" rowspan="1" colspan="1">
<a accesskey="u" href="libmail-folder.html" shape="rect">Up</a></td>
<td width="40%" align="right" rowspan="1" colspan="1">
 <a accesskey="n" href="folder-clone.html" shape="rect">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top" rowspan="1" colspan="1"><span class="structname">mail::folder</span>
Native API reference </td>
<td width="20%" align="center" rowspan="1" colspan="1">
<a accesskey="h" href="index.html" shape="rect">Home</a> | <a accesskey="t" href="bk01-toc.html" shape="rect">ToC</a></td>
<td width="40%" align="right" valign="top" rowspan="1" colspan="1"> mail::folder::clone</td>
</tr>
</table>
</div>
</body>
</html>
|