<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/> <title>Modifying message attributes</title> <link rel="stylesheet" href="manpage.css" type="text/css"/> <link rel="start" href="index.html" title="Cone: COnsole Newsreader And Emailer"/> <link rel="up" href="smap1.html" title="Appendix A. Simple Mail Access Protocol, Version 1"/> <link rel="prev" href="smapmessagecontents.html" title="Reading message contents"/> <link rel="next" href="smapconcurrency.html" title="More comments on concurrency"/> <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">Modifying message attributes</th> </tr> <tr> <td width="20%" align="left" rowspan="1" colspan="1"> <a accesskey="p" href="smapmessagecontents.html" shape="rect">Prev</a> </td> <th width="60%" align="center" rowspan="1" colspan="1"> Appendix A. Simple Mail Access Protocol, Version 1</th> <td width="20%" align="right" rowspan="1" colspan="1">  <a accesskey="n" href="smapconcurrency.html" shape="rect">Next</a></td> </tr> </table> <hr/> </div> <div class="section" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="store" shape="rect" name="store"> </a>Modifying message attributes</h3> </div> </div> </div> <div class="literallayout"> <p><br clear="none"/> C: STORE 4 6-7 +FLAGS=DELETED<br clear="none"/> S: * FETCH 4 FLAGS=SEEN,DELETED<br clear="none"/> S: * FETCH 6 FLAGS=SEEN,DELETED<br clear="none"/> S: * FETCH 7 FLAGS=SEEN,DELETED<br clear="none"/> S: +OK STORE completed<br clear="none"/> C: STORE 4 "INTERNALDATE=Mon, 20 Jan 2003 18:43:09 -0500"<br clear="none"/> S: * FETCH 4 "INTERNALDATE=Mon, 20 Jan 2003 18:43:09 -0500"<br clear="none"/> S: +OK STORE completed<br clear="none"/></p> </div> <p>The <code class="literal">STORE</code> command updates attributes of existing messages. A list of message numbers, as whitespace-delimited words, follows the <code class="literal">STORE</code>. “<span class="quote"><em class="replaceable"><code>m</code></em>-<em class="replaceable"><code>n</code></em></span>” designates messages #m through #n, inclusively.</p> <p>One or more words follow the message number list; they specify which attributes to set. Attribute settings are generally specified as <em class="replaceable"><code>name</code></em>=<em class="replaceable"><code>value</code></em>. As is with the <code class="literal">FETCH</code> command, servers should ignore attributes they do not recognize. The following attributes are defined at this time:</p> <div class="variablelist"> <dl> <dt><span class="term">FLAGS=<em class="replaceable"><code>list</code></em></span></dt> <dd> <p>Sets the messages flags precisely to <em class="replaceable"><code>list</code></em>, which is a comma-separated list of message flags. See “<span class="quote"><a class="link" href="attributes.html" title="Reading message attributes" shape="rect">Reading message attributes</a></span>” for a list of defined message flags.</p> </dd> <dt><span class="term">+FLAGS=<em class="replaceable"><code>list</code></em></span></dt> <dd> <p>Adds the flags in <em class="replaceable"><code>list</code></em> to the messages' flags. Other flags, if they are set for a message, remain set.</p> </dd> <dt><span class="term">-FLAGS=<em class="replaceable"><code>list</code></em></span></dt> <dd> <p>Remove the flags in <em class="replaceable"><code>list</code></em> from the messages' flags. Other flags, if they are set for a message, remain set.</p> </dd> <dt><span class="term">KEYWORDS=<em class="replaceable"><code>list</code></em></span></dt> <dd> <p>If the server's capability list includes “<span class="quote"><code class="literal">KEYWORD</code></span>”, then set the keywords associated with the message to <em class="replaceable"><code>list</code></em>, which is a comma-separated list of keywords. See “<span class="quote"><a class="link" href="conn.html" title="SMAP connection negotiation" shape="rect">SMAP connection negotiation</a></span>” for more information.</p> </dd> <dt><span class="term">+KEYWORDS=<em class="replaceable"><code>list</code></em></span></dt> <dd> <p>Adds keywords named in <em class="replaceable"><code>list</code></em>, which is a comma-separated list of keywords, to the existing keywords already set for the message. Existing keywords remain unaffected.</p> </dd> <dt><span class="term">-KEYWORDS=<em class="replaceable"><code>list</code></em></span></dt> <dd> <p>Removes keywords named in <em class="replaceable"><code>list</code></em>, which is a comma-separated list of keywords, from the list of existing keywords associated with this message.</p> </dd> <dt><span class="term">INTERNALDATE=<em class="replaceable"><code>date</code></em></span></dt> <dd> <p>Set the <code class="literal">INTERNALDATE</code> timestamp on a message to <em class="replaceable"><code>date</code></em>, which is an RFC-2822 formatted date/time value. See “<span class="quote"><a class="link" href="attributes.html" title="Reading message attributes" shape="rect">Reading message attributes</a></span>” for more information on the <code class="literal">INTERNALDATE</code> attribute.</p> </dd> </dl> </div> <p>The server's response includes “<span class="quote"><code class="literal">* FETCH</code></span>” single line replies that give the updated attributes of all affected messages. This is specifically needed when updating message flags, and is optional when updating <code class="literal">INTERNALDATE</code>s (there's not much point in echoing back the same timestamp).</p> </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="smapmessagecontents.html" shape="rect">Prev</a> </td> <td width="20%" align="center" rowspan="1" colspan="1"> <a accesskey="u" href="smap1.html" shape="rect">Up</a></td> <td width="40%" align="right" rowspan="1" colspan="1">  <a accesskey="n" href="smapconcurrency.html" shape="rect">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top" rowspan="1" colspan="1">Reading message contents </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"> More comments on concurrency</td> </tr> </table> </div> </body> </html>