Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 85dff41758625c26d7c6097135c8f737 > files > 105

cone-doc-0.78-3.fc12.x86_64.rpm

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>

  <title>mail::account::getSendFolder</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="native.html" title="mail::account Native API reference"/>
  <link rel="prev" href="mail-getfolderkeywordinfo.html" title="mail::account::getFolderKeywordInfo"/>
  <link rel="next" href="mail-hascapability.html" title="mail::account::hasCapability"/>
  <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::account::getSendFolder</th>
      </tr>

      <tr>
        <td width="20%" align="left" rowspan="1" colspan="1">
        <a accesskey="p" href="mail-getfolderkeywordinfo.html" shape="rect">Prev</a>&#160;</td>

        <th width="60%" align="center" rowspan="1" colspan="1">
        <span class="structname">mail::account</span> Native API
        reference</th>

        <td width="20%" align="right" rowspan="1" colspan="1">
        &#160;<a accesskey="n" href="mail-hascapability.html" shape="rect">Next</a></td>
      </tr>
    </table>
    <hr/>
  </div>

  <div class="refentry" lang="en" xml:lang="en">
    <a id="mail-getsendfolder" shape="rect" name="mail-getsendfolder"> </a>

    <div class="titlepage"/>

    <div class="refnamediv">
      <h2>Name</h2>

      <p>mail::account::getSendFolder &#8212; Create a folder
      object for sending mail</p>
    </div>

    <div class="refsynopsisdiv">
      <h2>Synopsis</h2>

      <div class="literallayout">
        <p><br clear="none"/>
        <br clear="none"/>
        <br clear="none"/>
        <br clear="none"/>
        #include&#160;&lt;libmail/mail.H&gt;<br clear="none"/>
        <br clear="none"/>
        <br clear="none"/>
        class&#160;myCallback&#160;:&#160;public&#160;mail::callback&#160;{<br clear="none"/>

        public:<br clear="none"/>
        &#160;&#160;&#160;&#160;void&#160;success(std::string&#160;msg);<br clear="none"/>

        &#160;&#160;&#160;&#160;void&#160;fail(std::string&#160;msg);<br clear="none"/>

        };<br clear="none"/></p>
      </div>

      <div class="literallayout">
        <p><br clear="none"/>
        <br clear="none"/>
        #include&#160;&lt;libmail/smtpinfo.H&gt;<br clear="none"/>
        #include&#160;&lt;libmail/addmessage.H&gt;<br clear="none"/>
        <br clear="none"/>
        mail::account&#160;*account;<br clear="none"/>
        <br clear="none"/>
        mail::smtpInfo&#160;info;<br clear="none"/>
        <br clear="none"/>
        info.sender="nobody@example.com";<br clear="none"/>
        <br clear="none"/>
        info.recipients.push_back("recipient@example.com");<br clear="none"/>

        <br clear="none"/></p>
      </div>

      <div class="funcsynopsis">
        <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
          <tr>
            <td rowspan="1" colspan="1"><code class="funcdef">mail::folder *folder=account-&gt;<b class="fsfunc">getSendFolder</b>(</code></td>

            <td rowspan="1" colspan="1">const mail::smtpInfo
            &amp;&#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">info</var>,</td>
          </tr>

          <tr>
            <td rowspan="1" colspan="1">&#160;</td>

            <td rowspan="1" colspan="1">const mail::folder
            *&#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">saveFolder</var>,</td>
          </tr>

          <tr>
            <td rowspan="1" colspan="1">&#160;</td>

            <td rowspan="1" colspan="1">std::string &#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">errmsg</var><code>)</code>;</td>
          </tr>
        </table>
      </div>

      <div class="literallayout">
        <p><br clear="none"/>
        myCallback&#160;sendCallback;<br clear="none"/>
        <br clear="none"/>
        mail::addMessage&#160;*addMessage=&#160;folder-&gt;addMessage(sendCallback);<br clear="none"/>

        <br clear="none"/>
        addMessage-&gt;saveMessageContents(std::string&#160;messageText);<br clear="none"/>

        addMessage-&gt;go();<br clear="none"/></p>
      </div>
    </div>

    <div class="refsect1" lang="en" xml:lang="en">
      <a id="id589139" shape="rect" name="id589139"> </a>

      <h2>USAGE</h2>

      <p>This function creates a special folder object: copying a
      message to this folder will E-mail it to the designated
      recipient list. The <span class="structname">mail::account</span> object must be an account
      that's capable of creating this kind of a folder (such as
      <code class="literal">smtp</code> accounts created by
      <a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</span>(3x)</span></a>).
      The message may be manually added to the folder with
      <a class="link" href="folder-addmessage.html" title="mail::folder::addMessage" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::folder::addmessage</span>(3x)</span></a>,
      or by copying a message from another folder using <a class="link" href="mail-copymessagesto.html" title="mail::account::copyMessagesTo" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::folder::copyMessagesTo</span>(3x)</span></a>.</p>

      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
        <h3 class="title">Note</h3>

        <p>Multiple messages may be copied to this <span class="structname">mail::folder</span>. Each messages is E-mail
        separately, to all recipients. Excersize caution to prevent
        an accidental request to copy an entire folder, with
        thousand messages, to a thousand recipients.</p>
      </div>

      <div class="refsect2" lang="en" xml:lang="en">
        <a id="id576937" shape="rect" name="id576937"> </a>

        <h3><em class="parameter"><code>saveFolder</code></em></h3>

        <p><em class="parameter"><code>saveFolder</code></em>, if
        not <code class="literal">NULL</code>, specifies that a
        copy of the message should also be saved in this folder. If
        this mail account uses the experimental <a class="link" href="smap1.html" title="Appendix&#160;A.&#160;Simple Mail Access Protocol, Version 1" shape="rect">SMAP</a> protocol, a single copy of the
        message will be transmitted to the <code class="literal">SMAP</code> server, which will file the message
        in the folder, and send it to the designated recipients.
        Otherwise the message is manually saved to this folder
        using <a class="link" href="folder-addmessage.html" title="mail::folder::addMessage" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::folder::addMessage</span>(3x)</span></a>,
        or <a class="link" href="account-libmail-addmessage.html" title="mail::ACCOUNT::addMessage" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::ACCOUNT::addMessage</span>(3x)</span></a>.</p>
      </div>

      <div class="refsect2" lang="en" xml:lang="en">
        <a id="id577255" shape="rect" name="id577255"> </a>

        <h3>The <span class="structname">mail::smtpInfo</span>
        object</h3>

        <p><em class="parameter"><code>info</code></em> specifies
        the following parameters which are used to deliver the
        message:</p>
        <pre class="programlisting" xml:space="preserve">
class mail::smtpInfo {
public:
        std::string sender;

        std::vector&lt;std::string&gt; recipients;

        std::map&lt;std::string, std::string&gt; options;
} ;
</pre>

        <p><em class="structfield"><code>sender</code></em>
        specifies the sender's E-mail address, in the form of
        "<em class="replaceable"><code>user</code></em>@<em class="replaceable"><code>domain</code></em>". <em class="structfield"><code>recipients</code></em> is a list of
        recipients' E-mail addresses. At least one recipient must
        be specified.</p>

        <p><em class="structfield"><code>options</code></em>
        specifies additional parameters for sending E-mail,
        initialized as follows:</p>

        <div class="variablelist">
          <dl>
            <dt><span class="term">options.insert(make_pair("novalidate-cert",
            "1"))</span></dt>

            <dd>
              <p>See <a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</span>(3x)</span></a>)
              for a description of this option.</p>
            </dd>

            <dt><span class="term">options.insert(make_pair("cram",
            "1"))</span></dt>

            <dd>
              <p>See <a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</span>(3x)</span></a>)
              for a description of this option.</p>
            </dd>

            <dt><span class="term">options.insert(make_pair("DSN",
            "<em class="replaceable"><code>list</code></em>"))</span></dt>

            <dd>
              <p>Request a delivery status notification. <em class="replaceable"><code>list</code></em> is a
              comma-separated list of the following keywords:
              "<code class="literal">never</code>" - do not request
              any receipts, not even non-delivery notices;
              "<code class="literal">success</code>" - request a
              delivery confirmation receipt; "<code class="literal">fail</code>" - request a non-delivery
              notice; "<code class="literal">delay</code>" -
              request a delayed delivery notice.</p>

              <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
                <h3 class="title">Note</h3>

                <p>An error will be reported if the mail server
                does not implement delivery status
                notifications.</p>
              </div>
            </dd>

            <dt><span class="term">options.insert(make_pair("RET",
            "hdrs"))</span></dt>

            <dd>
              <p>Request that the delivery status notification
              should not include the entire original message, only
              its headers.</p>
            </dd>

            <dt><span class="term">options.insert(make_pair("RET",
            "full"))</span></dt>

            <dd>
              <p>Request that the delivery status notifications
              should include the entire original message.</p>
            </dd>

            <dt><span class="term">options.insert(make_pair("NOPIPELINING",
            "1"))</span></dt>

            <dd>
              <p>Do not use the <code class="literal">PIPELINING</code> <code class="literal">SMTP</code> extension even if the mail
              server claims to support it (workaround for buggy
              firewalls).</p>
            </dd>

            <dt><span class="term">options.insert(make_pair("VERP",
            "1"))</span></dt>

            <dd>
              <p>Use the <code class="literal">VERP</code> mailing
              list extension. If the <em class="structfield"><code>sender</code></em> address is
              "<em class="replaceable"><code>sender</code></em>@<em class="replaceable"><code>senddomain</code></em>", then a
              delivery status notification for "<em class="replaceable"><code>recipient</code></em>@<em class="replaceable"><code>recipientdomain</code></em>" will
              be sent to "<em class="replaceable"><code>sender</code></em>-<em class="replaceable"><code>recipient</code></em>=<em class="replaceable"><code>recipientdomain</code></em>@<em class="replaceable"><code>senddomain</code></em>"
              (with certain additional details). This option is
              currently implemented only by the <a class="ulink" href="http://www.courier-mta.org" target="_top" shape="rect">Courier mail server</a>.</p>
            </dd>

            <dt><span class="term">options.insert(make_pair("SECURITY",
            "STARTTLS"))</span></dt>

            <dd>
              <p>The message must be sent via TLS, and the
              recipient's server must present a certificate signed
              by a trusted, private, certificate authority. This
              option is currently implemented only by the <a class="ulink" href="http://www.courier-mta.org" target="_top" shape="rect">Courier mail server</a>.</p>

              <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
                <h3 class="title">Note</h3>

                <p>This is not the standard <code class="literal">STARTTLS</code> <code class="literal">ESMTP</code> extension. <code class="literal">STARTTLS</code> is always used
                automatically, if it's supported by the mail
                server.</p>
              </div>
            </dd>
          </dl>
        </div>
      </div>
    </div>

    <div class="refsect1" lang="en" xml:lang="en">
      <a id="id589634" shape="rect" name="id589634"> </a>

      <h2>RETURN CODES AND CALLBACKS</h2>

      <p><code class="function">mail::account::getSendFolder</code>
      returns NULL if this <span class="structname">mail::account</span> object is not capable of
      sending mail. <em class="parameter"><code>errmsg</code></em>
      is initialized with an appropriate error message.</p>
    </div>

    <div class="refsect1" lang="en" xml:lang="en">
      <a id="id589660" shape="rect" name="id589660"> </a>

      <h2>SEE ALSO</h2>

      <p><a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</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="mail-getfolderkeywordinfo.html" shape="rect">Prev</a>&#160;</td>

        <td width="20%" align="center" rowspan="1" colspan="1">
        <a accesskey="u" href="native.html" shape="rect">Up</a></td>

        <td width="40%" align="right" rowspan="1" colspan="1">
        &#160;<a accesskey="n" href="mail-hascapability.html" shape="rect">Next</a></td>
      </tr>

      <tr>
        <td width="40%" align="left" valign="top" rowspan="1" colspan="1">mail::account::getFolderKeywordInfo&#160;</td>

        <td width="20%" align="center" rowspan="1" colspan="1">
        <a accesskey="h" href="index.html" shape="rect">Home</a>&#160;|&#160;<a accesskey="t" href="bk01-toc.html" shape="rect">ToC</a></td>

        <td width="40%" align="right" valign="top" rowspan="1" colspan="1">&#160;mail::account::hasCapability</td>
      </tr>
    </table>
  </div>
</body>
</html>