Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bc75e49382dc9b94ff02ee45f6438cf2 > files > 200

ruby-actionmailer-2.3.4-1mdv2010.0.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: TMail::Mail</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">TMail::Mail</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/lib/action_mailer/vendor/tmail-1_2_3/tmail/attachments_rb.html">
                lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb
                </a>
        <br />
                <a href="../../files/lib/action_mailer/vendor/tmail-1_2_3/tmail/interface_rb.html">
                lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb
                </a>
        <br />
                <a href="../../files/lib/action_mailer/vendor/tmail-1_2_3/tmail/mail_rb.html">
                lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb
                </a>
        <br />
                <a href="../../files/lib/action_mailer/vendor/tmail-1_2_3/tmail/net_rb.html">
                lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb
                </a>
        <br />
                <a href="../../files/lib/action_mailer/vendor/tmail-1_2_3/tmail/quoting_rb.html">
                lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <h2><a href="Mail.html">Mail</a> Class</h2>
<p>
Accessing a <a href="../TMail.html">TMail</a> object done via the <a
href="Mail.html">TMail::Mail</a> class. As email can be fairly complex
creatures, you will find a large amount of accessor and setter methods in
this class!
</p>
<p>
Most of the below methods handle the <a
href="Mail.html#M000113">header</a>, in fact, what <a
href="../TMail.html">TMail</a> does best is handle the <a
href="Mail.html#M000113">header</a> of the email object. There are only a
few methods that deal directly with the <a
href="Mail.html#M000161">body</a> of the email, such as <a
href="Mail.html#M000097">base64_encode</a> and <a
href="Mail.html#M000099">base64_decode</a>.
</p>
<h3>Using <a href="../TMail.html">TMail</a> inside your code</h3>
<p>
The usual way is <a href="Mail.html#M000045">to</a> install the gem (see
the {README}[<a href="../../README">README</a>] on how <a
href="Mail.html#M000045">to</a> do this) and then put at the top of your
class:
</p>
<pre>
 require 'tmail'
</pre>
<p>
You can then create a new <a href="../TMail.html">TMail</a> object in your
code with:
</p>
<pre>
 @email = TMail::Mail.new
</pre>
<p>
Or if you have an email as a string, you can initialize a new <a
href="Mail.html">TMail::Mail</a> object and get it <a
href="Mail.html#M000045">to</a> <a href="Mail.html#M000109">parse</a> that
string for you like so:
</p>
<pre>
 @email = TMail::Mail.parse(email_text)
</pre>
<p>
You can also read a single email off the disk, for example:
</p>
<pre>
 @email = TMail::Mail.load('filename.txt')
</pre>
<p>
Also, you can read a mailbox (usual unix mbox format) and end up with an
array of <a href="../TMail.html">TMail</a> objects by doing something like
this:
</p>
<pre>
 # Note, we pass true as the last variable to open the mailbox read only
 mailbox = TMail::UNIXMbox.new(&quot;mailbox&quot;, nil, true)
 @emails = []
 mailbox.each_port { |m| @emails &lt;&lt; TMail::Mail.new(m) }
</pre>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000114">[]</a>&nbsp;&nbsp;
      <a href="#M000117">[]=</a>&nbsp;&nbsp;
      <a href="#M000112">accept</a>&nbsp;&nbsp;
      <a href="#M000153">add_date</a>&nbsp;&nbsp;
      <a href="#M000152">add_message_id</a>&nbsp;&nbsp;
      <a href="#M000033">attachment?</a>&nbsp;&nbsp;
      <a href="#M000034">attachments</a>&nbsp;&nbsp;
      <a href="#M000099">base64_decode</a>&nbsp;&nbsp;
      <a href="#M000098">base64_decode!</a>&nbsp;&nbsp;
      <a href="#M000097">base64_encode</a>&nbsp;&nbsp;
      <a href="#M000096">base64_encode!</a>&nbsp;&nbsp;
      <a href="#M000047">bcc</a>&nbsp;&nbsp;
      <a href="#M000050">bcc=</a>&nbsp;&nbsp;
      <a href="#M000041">bcc_addrs</a>&nbsp;&nbsp;
      <a href="#M000044">bcc_addrs=</a>&nbsp;&nbsp;
      <a href="#M000161">body</a>&nbsp;&nbsp;
      <a href="#M000138">body=</a>&nbsp;&nbsp;
      <a href="#M000134">body_port</a>&nbsp;&nbsp;
      <a href="#M000046">cc</a>&nbsp;&nbsp;
      <a href="#M000049">cc=</a>&nbsp;&nbsp;
      <a href="#M000040">cc_addrs</a>&nbsp;&nbsp;
      <a href="#M000043">cc_addrs=</a>&nbsp;&nbsp;
      <a href="#M000081">charset</a>&nbsp;&nbsp;
      <a href="#M000082">charset=</a>&nbsp;&nbsp;
      <a href="#M000126">clear</a>&nbsp;&nbsp;
      <a href="#M000090">content_disposition</a>&nbsp;&nbsp;
      <a href="#M000094">content_disposition=</a>&nbsp;&nbsp;
      <a href="#M000087">content_transfer_encoding</a>&nbsp;&nbsp;
      <a href="#M000088">content_transfer_encoding=</a>&nbsp;&nbsp;
      <a href="#M000075">content_type</a>&nbsp;&nbsp;
      <a href="#M000079">content_type=</a>&nbsp;&nbsp;
      <a href="#M000146">content_type_is_text?</a>&nbsp;&nbsp;
      <a href="#M000107">create_forward</a>&nbsp;&nbsp;
      <a href="#M000106">create_reply</a>&nbsp;&nbsp;
      <a href="#M000036">date</a>&nbsp;&nbsp;
      <a href="#M000037">date=</a>&nbsp;&nbsp;
      <a href="#M000127">delete</a>&nbsp;&nbsp;
      <a href="#M000128">delete_if</a>&nbsp;&nbsp;
      <a href="#M000151">delete_no_send_fields</a>&nbsp;&nbsp;
      <a href="#M000100">destinations</a>&nbsp;&nbsp;
      <a href="#M000089">disposition</a>&nbsp;&nbsp;
      <a href="#M000092">disposition=</a>&nbsp;&nbsp;
      <a href="#M000145">disposition_is_attachment?</a>&nbsp;&nbsp;
      <a href="#M000095">disposition_param</a>&nbsp;&nbsp;
      <a href="#M000135">each</a>&nbsp;&nbsp;
      <a href="#M000102">each_dest</a>&nbsp;&nbsp;
      <a href="#M000101">each_destination</a>&nbsp;&nbsp;
      <a href="#M000123">each_field</a>&nbsp;&nbsp;
      <a href="#M000119">each_header</a>&nbsp;&nbsp;
      <a href="#M000121">each_header_name</a>&nbsp;&nbsp;
      <a href="#M000122">each_key</a>&nbsp;&nbsp;
      <a href="#M000120">each_pair</a>&nbsp;&nbsp;
      <a href="#M000144">each_part</a>&nbsp;&nbsp;
      <a href="#M000124">each_value</a>&nbsp;&nbsp;
      <a href="#M000085">encoding</a>&nbsp;&nbsp;
      <a href="#M000086">encoding=</a>&nbsp;&nbsp;
      <a href="#M000141">epilogue</a>&nbsp;&nbsp;
      <a href="#M000142">epilogue=</a>&nbsp;&nbsp;
      <a href="#M000104">error_reply_addresses</a>&nbsp;&nbsp;
      <a href="#M000116">fetch</a>&nbsp;&nbsp;
      <a href="#M000055">friendly_from</a>&nbsp;&nbsp;
      <a href="#M000053">from</a>&nbsp;&nbsp;
      <a href="#M000054">from=</a>&nbsp;&nbsp;
      <a href="#M000051">from_addrs</a>&nbsp;&nbsp;
      <a href="#M000052">from_addrs=</a>&nbsp;&nbsp;
      <a href="#M000032">has_attachments?</a>&nbsp;&nbsp;
      <a href="#M000113">header</a>&nbsp;&nbsp;
      <a href="#M000035">header_string</a>&nbsp;&nbsp;
      <a href="#M000069">in_reply_to</a>&nbsp;&nbsp;
      <a href="#M000070">in_reply_to=</a>&nbsp;&nbsp;
      <a href="#M000132">indexes</a>&nbsp;&nbsp;
      <a href="#M000133">indices</a>&nbsp;&nbsp;
      <a href="#M000110">inspect</a>&nbsp;&nbsp;
      <a href="#M000130">key?</a>&nbsp;&nbsp;
      <a href="#M000129">keys</a>&nbsp;&nbsp;
      <a href="#M000108">load</a>&nbsp;&nbsp;
      <a href="#M000076">main_type</a>&nbsp;&nbsp;
      <a href="#M000067">message_id</a>&nbsp;&nbsp;
      <a href="#M000068">message_id=</a>&nbsp;&nbsp;
      <a href="#M000154">mime_encode</a>&nbsp;&nbsp;
      <a href="#M000157">mime_encode_binary</a>&nbsp;&nbsp;
      <a href="#M000158">mime_encode_multipart</a>&nbsp;&nbsp;
      <a href="#M000155">mime_encode_singlepart</a>&nbsp;&nbsp;
      <a href="#M000156">mime_encode_text</a>&nbsp;&nbsp;
      <a href="#M000073">mime_version</a>&nbsp;&nbsp;
      <a href="#M000074">mime_version=</a>&nbsp;&nbsp;
      <a href="#M000105">multipart?</a>&nbsp;&nbsp;
      <a href="#M000125">ordered_each</a>&nbsp;&nbsp;
      <a href="#M000109">parse</a>&nbsp;&nbsp;
      <a href="#M000143">parts</a>&nbsp;&nbsp;
      <a href="#M000139">preamble</a>&nbsp;&nbsp;
      <a href="#M000140">preamble=</a>&nbsp;&nbsp;
      <a href="#M000136">quoted_body</a>&nbsp;&nbsp;
      <a href="#M000137">quoted_body=</a>&nbsp;&nbsp;
      <a href="#M000065">quoted_subject</a>&nbsp;&nbsp;
      <a href="#M000150">ready_to_send</a>&nbsp;&nbsp;
      <a href="#M000071">references</a>&nbsp;&nbsp;
      <a href="#M000072">references=</a>&nbsp;&nbsp;
      <a href="#M000103">reply_addresses</a>&nbsp;&nbsp;
      <a href="#M000058">reply_to</a>&nbsp;&nbsp;
      <a href="#M000059">reply_to=</a>&nbsp;&nbsp;
      <a href="#M000056">reply_to_addrs</a>&nbsp;&nbsp;
      <a href="#M000057">reply_to_addrs=</a>&nbsp;&nbsp;
      <a href="#M000148">send_text_to</a>&nbsp;&nbsp;
      <a href="#M000147">send_to</a>&nbsp;&nbsp;
      <a href="#M000149">send_to_0</a>&nbsp;&nbsp;
      <a href="#M000062">sender</a>&nbsp;&nbsp;
      <a href="#M000063">sender=</a>&nbsp;&nbsp;
      <a href="#M000060">sender_addr</a>&nbsp;&nbsp;
      <a href="#M000061">sender_addr=</a>&nbsp;&nbsp;
      <a href="#M000093">set_content_disposition</a>&nbsp;&nbsp;
      <a href="#M000078">set_content_type</a>&nbsp;&nbsp;
      <a href="#M000091">set_disposition</a>&nbsp;&nbsp;
      <a href="#M000118">store</a>&nbsp;&nbsp;
      <a href="#M000038">strftime</a>&nbsp;&nbsp;
      <a href="#M000115">sub_header</a>&nbsp;&nbsp;
      <a href="#M000077">sub_type</a>&nbsp;&nbsp;
      <a href="#M000064">subject</a>&nbsp;&nbsp;
      <a href="#M000159">subject</a>&nbsp;&nbsp;
      <a href="#M000066">subject=</a>&nbsp;&nbsp;
      <a href="#M000045">to</a>&nbsp;&nbsp;
      <a href="#M000048">to=</a>&nbsp;&nbsp;
      <a href="#M000039">to_addrs</a>&nbsp;&nbsp;
      <a href="#M000042">to_addrs=</a>&nbsp;&nbsp;
      <a href="#M000083">transfer_encoding</a>&nbsp;&nbsp;
      <a href="#M000084">transfer_encoding=</a>&nbsp;&nbsp;
      <a href="#M000080">type_param</a>&nbsp;&nbsp;
      <a href="#M000160">unquoted_body</a>&nbsp;&nbsp;
      <a href="#M000131">values_at</a>&nbsp;&nbsp;
      <a href="#M000111">write_back</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name">StrategyInterface</span>
      </div>
    </div>

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">ALLOW_MULTIPLE</td>
          <td>=</td>
          <td class="context-item-value">{       'received'          =&gt; true,       'resent-date'       =&gt; true,       'resent-from'       =&gt; true,       'resent-sender'     =&gt; true,       'resent-to'         =&gt; true,       'resent-cc'         =&gt; true,       'resent-bcc'        =&gt; true,       'resent-message-id' =&gt; true,       'comments'          =&gt; true,       'keywords'          =&gt; true</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
<a href="Mail.html#M000113">header</a>

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">USE_ARRAY</td>
          <td>=</td>
          <td class="context-item-value">ALLOW_MULTIPLE</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">FIELD_ORDER</td>
          <td>=</td>
          <td class="context-item-value">%w(       return-path received       resent-date resent-from resent-sender resent-to       resent-cc resent-bcc resent-message-id       date from sender reply-to to cc bcc       message-id in-reply-to references       subject comments keywords       mime-version content-type content-transfer-encoding       content-disposition content-description     )</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">NOSEND_FIELDS</td>
          <td>=</td>
          <td class="context-item-value">%w(       received       bcc     )</td>
        </tr>
        </table>
      </div>
    </div>

    <div id="aliases-list">
      <h3 class="section-bar">External Aliases</h3>

      <div class="name-list">
                        <table summary="aliases">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">load</td>
          <td>-&gt;</td>
          <td class="context-item-value">load_from</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">load</td>
          <td>-&gt;</td>
          <td class="context-item-value">loadfrom</td>
        </tr>
                        </table>
      </div>
    </div>


    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">port</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc">
Provides access <a href="Mail.html#M000045">to</a> the port this email is
using <a href="Mail.html#M000045">to</a> hold it&#8216;s data

<p>
Example:
</p>
<pre>
 mail = TMail::Mail.parse(email_string)
 mail.port
 #=&gt; #&lt;TMail::StringPort:id=0xa2c952&gt;
</pre>
</td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000108" class="method-detail">
        <a name="M000108"></a>

        <div class="method-heading">
          <a href="Mail.src/M000108.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000108.html');return false;">
          <span class="method-name">load</span><span class="method-args">( fname )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Opens an email that has been saved out as a file by itself.
</p>
<p>
This function will read a file non-destructively and then <a
href="Mail.html#M000109">parse</a> the contents and return a <a
href="Mail.html">TMail::Mail</a> object.
</p>
<p>
Does not handle multiple email mailboxes (like a unix mbox) for that use
the <a href="UNIXMbox.html">TMail::UNIXMbox</a> class.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.load('filename')
</pre>
        </div>
      </div>

      <div id="method-M000109" class="method-detail">
        <a name="M000109"></a>

        <div class="method-heading">
          <a href="Mail.src/M000109.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000109.html');return false;">
          <span class="method-name">parse</span><span class="method-args">( str )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Parses an email <a href="Mail.html#M000053">from</a> the supplied string
and returns a <a href="Mail.html">TMail::Mail</a> object.
</p>
<p>
Example:
</p>
<pre>
 require 'rubygems'; require 'tmail'
 email_string =&lt;&lt;HEREDOC
 To: mikel@lindsaar.net
 From: mikel@me.com
 Subject: This is a short Email

 Hello there Mikel!

 HEREDOC
 mail = TMail::Mail.parse(email_string)
 #=&gt; #&lt;TMail::Mail port=#&lt;TMail::StringPort:id=0xa30ac0&gt; bodyport=nil&gt;
 mail.body
 #=&gt; &quot;Hello there Mikel!\n\n&quot;
</pre>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000114" class="method-detail">
        <a name="M000114"></a>

        <div class="method-heading">
          <a href="Mail.src/M000114.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000114.html');return false;">
          <span class="method-name">[]</span><span class="method-args">( key )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a <a href="AddressHeader.html">TMail::AddressHeader</a> object of
the field you are querying. Examples:
</p>
<pre>
 @mail['from']  #=&gt; #&lt;TMail::AddressHeader &quot;mikel@test.com.au&quot;&gt;
 @mail['to']    #=&gt; #&lt;TMail::AddressHeader &quot;mikel@test.com.au&quot;&gt;
</pre>
<p>
You can get the string value of this by passing &quot;to_s&quot; <a
href="Mail.html#M000045">to</a> the query: Example:
</p>
<pre>
 @mail['to'].to_s #=&gt; &quot;mikel@test.com.au&quot;
</pre>
        </div>
      </div>

      <div id="method-M000117" class="method-detail">
        <a name="M000117"></a>

        <div class="method-heading">
          <a href="Mail.src/M000117.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000117.html');return false;">
          <span class="method-name">[]=</span><span class="method-args">( key, val )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Allows you <a href="Mail.html#M000045">to</a> set or <a
href="Mail.html#M000127">delete</a> <a href="../TMail.html">TMail</a> <a
href="Mail.html#M000113">header</a> objects at will. Examples:
</p>
<pre>
 @mail = TMail::Mail.new
 @mail['to'].to_s       # =&gt; 'mikel@test.com.au'
 @mail['to'] = 'mikel@elsewhere.org'
 @mail['to'].to_s       # =&gt; 'mikel@elsewhere.org'
 @mail.encoded          # =&gt; &quot;To: mikel@elsewhere.org\r\n\r\n&quot;
 @mail['to'] = nil
 @mail['to'].to_s       # =&gt; nil
 @mail.encoded          # =&gt; &quot;\r\n&quot;
</pre>
<p>
Note: setting mail[] = nil actually deletes the <a
href="Mail.html#M000113">header</a> field in question <a
href="Mail.html#M000053">from</a> the object, it does not just set the
value of the hash <a href="Mail.html#M000045">to</a> nil
</p>
        </div>
      </div>

      <div id="method-M000112" class="method-detail">
        <a name="M000112"></a>

        <div class="method-heading">
          <a href="Mail.src/M000112.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000112.html');return false;">
          <span class="method-name">accept</span><span class="method-args">( strategy )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000153" class="method-detail">
        <a name="M000153"></a>

        <div class="method-heading">
          <a href="Mail.src/M000153.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000153.html');return false;">
          <span class="method-name">add_date</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000152" class="method-detail">
        <a name="M000152"></a>

        <div class="method-heading">
          <a href="Mail.src/M000152.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000152.html');return false;">
          <span class="method-name">add_message_id</span><span class="method-args">( fqdn = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000033" class="method-detail">
        <a name="M000033"></a>

        <div class="method-heading">
          <a href="Mail.src/M000033.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000033.html');return false;">
          <span class="method-name">attachment?</span><span class="method-args">(part)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000034" class="method-detail">
        <a name="M000034"></a>

        <div class="method-heading">
          <a href="Mail.src/M000034.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000034.html');return false;">
          <span class="method-name">attachments</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000099" class="method-detail">
        <a name="M000099"></a>

        <div class="method-heading">
          <a href="Mail.src/M000099.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000099.html');return false;">
          <span class="method-name">base64_decode</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the result of decoding the <a href="Mail.html">TMail::Mail</a>
object <a href="Mail.html#M000161">body</a> without altering the current <a
href="Mail.html#M000161">body</a>
</p>
        </div>
      </div>

      <div id="method-M000098" class="method-detail">
        <a name="M000098"></a>

        <div class="method-heading">
          <a href="Mail.src/M000098.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000098.html');return false;">
          <span class="method-name">base64_decode!</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Convert the <a href="Mail.html">Mail</a> object&#8216;s <a
href="Mail.html#M000161">body</a> into a Base64 decoded email returning the
modified <a href="Mail.html">Mail</a> object
</p>
        </div>
      </div>

      <div id="method-M000097" class="method-detail">
        <a name="M000097"></a>

        <div class="method-heading">
          <a href="Mail.src/M000097.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000097.html');return false;">
          <span class="method-name">base64_encode</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return the result of <a href="Mail.html#M000085">encoding</a> the <a
href="Mail.html">TMail::Mail</a> object <a
href="Mail.html#M000161">body</a> without altering the current <a
href="Mail.html#M000161">body</a>
</p>
        </div>
      </div>

      <div id="method-M000096" class="method-detail">
        <a name="M000096"></a>

        <div class="method-heading">
          <a href="Mail.src/M000096.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000096.html');return false;">
          <span class="method-name">base64_encode!</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Convert the <a href="Mail.html">Mail</a> object&#8216;s <a
href="Mail.html#M000161">body</a> into a Base64 encoded email returning the
modified <a href="Mail.html">Mail</a> object
</p>
        </div>
      </div>

      <div id="method-M000047" class="method-detail">
        <a name="M000047"></a>

        <div class="method-heading">
          <a href="Mail.src/M000047.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000047.html');return false;">
          <span class="method-name">bcc</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns who the email <a href="Mail.html#M000047">bcc</a>&#8216;d as an
Array of email addresses as opposed <a href="Mail.html#M000045">to</a> an
Array of <a href="Address.html">TMail::Address</a> objects which is what <a
href="Mail.html#M000039">Mail#to_addrs</a> returns
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.bcc = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.bcc #=&gt;  [&quot;mikel@me.org&quot;, &quot;mikel@you.org&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000050" class="method-detail">
        <a name="M000050"></a>

        <div class="method-heading">
          <a href="Mail.src/M000050.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000050.html');return false;">
          <span class="method-name">bcc=</span><span class="method-args">( *strs )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the &quot;Bcc:&quot; field <a
href="Mail.html#M000045">to</a> the passed array of strings (which should
be valid email addresses)
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.bcc = [&quot;mikel@abc.com&quot;, &quot;Mikel &lt;mikel@xyz.com&gt;&quot;]
 mail.bcc #=&gt;  [&quot;mikel@abc.org&quot;, &quot;mikel@xyz.org&quot;]
 mail['bcc'].to_s #=&gt; &quot;mikel@abc.com, Mikel &lt;mikel@xyz.com&gt;&quot;
</pre>
        </div>
      </div>

      <div id="method-M000041" class="method-detail">
        <a name="M000041"></a>

        <div class="method-heading">
          <a href="Mail.src/M000041.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000041.html');return false;">
          <span class="method-name">bcc_addrs</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return a TMail::Addresses instance for <a href="Mail.html#M000135">each</a>
entry in the &quot;Bcc:&quot; field of the mail object <a
href="Mail.html#M000113">header</a>.
</p>
<p>
If the &quot;Bcc:&quot; field does not exist, will return nil by default or
the value you pass as the optional parameter.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.bcc_addrs #=&gt; nil
 mail.bcc_addrs([]) #=&gt; []
 mail.bcc = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.bcc_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000044" class="method-detail">
        <a name="M000044"></a>

        <div class="method-heading">
          <a href="Mail.src/M000044.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000044.html');return false;">
          <span class="method-name">bcc_addrs=</span><span class="method-args">( arg )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively set the <a href="Mail.html#M000045">to</a> field of the
&quot;Bcc:&quot; <a href="Mail.html#M000113">header</a> <a
href="Mail.html#M000045">to</a> equal the passed in string.
</p>
<p>
<a href="../TMail.html">TMail</a> will <a
href="Mail.html#M000109">parse</a> your contents and turn <a
href="Mail.html#M000135">each</a> valid email address into a <a
href="Address.html">TMail::Address</a> object before assigning it <a
href="Mail.html#M000045">to</a> the mail message.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.bcc = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.bcc_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000161" class="method-detail">
        <a name="M000161"></a>

        <div class="method-heading">
          <a href="Mail.src/M000161.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000161.html');return false;">
          <span class="method-name">body</span><span class="method-args">(to_charset = 'utf-8', &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000138" class="method-detail">
        <a name="M000138"></a>

        <div class="method-heading">
          <a href="Mail.src/M000138.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000138.html');return false;">
          <span class="method-name">body=</span><span class="method-args">( str )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000134" class="method-detail">
        <a name="M000134"></a>

        <div class="method-heading">
          <a href="Mail.src/M000134.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000134.html');return false;">
          <span class="method-name">body_port</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
<a href="Mail.html#M000161">body</a>
</p>
        </div>
      </div>

      <div id="method-M000046" class="method-detail">
        <a name="M000046"></a>

        <div class="method-heading">
          <a href="Mail.src/M000046.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000046.html');return false;">
          <span class="method-name">cc</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns who the email <a href="Mail.html#M000046">cc</a>&#8216;d as an
Array of email addresses as opposed <a href="Mail.html#M000045">to</a> an
Array of <a href="Address.html">TMail::Address</a> objects which is what <a
href="Mail.html#M000039">Mail#to_addrs</a> returns
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.cc = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.cc #=&gt;  [&quot;mikel@me.org&quot;, &quot;mikel@you.org&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000049" class="method-detail">
        <a name="M000049"></a>

        <div class="method-heading">
          <a href="Mail.src/M000049.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000049.html');return false;">
          <span class="method-name">cc=</span><span class="method-args">( *strs )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the &quot;Cc:&quot; field <a
href="Mail.html#M000045">to</a> the passed array of strings (which should
be valid email addresses)
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.cc = [&quot;mikel@abc.com&quot;, &quot;Mikel &lt;mikel@xyz.com&gt;&quot;]
 mail.cc #=&gt;  [&quot;mikel@abc.org&quot;, &quot;mikel@xyz.org&quot;]
 mail['cc'].to_s #=&gt; &quot;mikel@abc.com, Mikel &lt;mikel@xyz.com&gt;&quot;
</pre>
        </div>
      </div>

      <div id="method-M000040" class="method-detail">
        <a name="M000040"></a>

        <div class="method-heading">
          <a href="Mail.src/M000040.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000040.html');return false;">
          <span class="method-name">cc_addrs</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return a TMail::Addresses instance for <a href="Mail.html#M000135">each</a>
entry in the &quot;Cc:&quot; field of the mail object <a
href="Mail.html#M000113">header</a>.
</p>
<p>
If the &quot;Cc:&quot; field does not exist, will return nil by default or
the value you pass as the optional parameter.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.cc_addrs #=&gt; nil
 mail.cc_addrs([]) #=&gt; []
 mail.cc = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.cc_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000043" class="method-detail">
        <a name="M000043"></a>

        <div class="method-heading">
          <a href="Mail.src/M000043.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000043.html');return false;">
          <span class="method-name">cc_addrs=</span><span class="method-args">( arg )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively set the <a href="Mail.html#M000045">to</a> field of the
&quot;Cc:&quot; <a href="Mail.html#M000113">header</a> <a
href="Mail.html#M000045">to</a> equal the passed in string.
</p>
<p>
<a href="../TMail.html">TMail</a> will <a
href="Mail.html#M000109">parse</a> your contents and turn <a
href="Mail.html#M000135">each</a> valid email address into a <a
href="Address.html">TMail::Address</a> object before assigning it <a
href="Mail.html#M000045">to</a> the mail message.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.cc = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.cc_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000081" class="method-detail">
        <a name="M000081"></a>

        <div class="method-heading">
          <a href="Mail.src/M000081.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000081.html');return false;">
          <span class="method-name">charset</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the character set of the email. Returns nil if no <a
href="Mail.html#M000085">encoding</a> set or returns whatever default you
pass as a parameter - note passing the parameter does NOT change the mail
object in any way.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.load(&quot;path_to/utf8_email&quot;)
 mail.charset #=&gt; &quot;UTF-8&quot;

 mail = TMail::Mail.new
 mail.charset #=&gt; nil
 mail.charset(&quot;US-ASCII&quot;) #=&gt; &quot;US-ASCII&quot;
</pre>
        </div>
      </div>

      <div id="method-M000082" class="method-detail">
        <a name="M000082"></a>

        <div class="method-heading">
          <a href="Mail.src/M000082.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000082.html');return false;">
          <span class="method-name">charset=</span><span class="method-args">( str )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the character set used by this mail object <a
href="Mail.html#M000045">to</a> the passed string, you should note though
that this does nothing <a href="Mail.html#M000045">to</a> the mail <a
href="Mail.html#M000161">body</a>, just changes the <a
href="Mail.html#M000113">header</a> value, you will need <a
href="Mail.html#M000045">to</a> transliterate the <a
href="Mail.html#M000161">body</a> as well <a
href="Mail.html#M000045">to</a> match whatever you put in this <a
href="Mail.html#M000113">header</a> value if you are changing character
sets.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.charset #=&gt; nil
 mail.charset = &quot;UTF-8&quot;
 mail.charset #=&gt; &quot;UTF-8&quot;
</pre>
        </div>
      </div>

      <div id="method-M000126" class="method-detail">
        <a name="M000126"></a>

        <div class="method-heading">
          <a href="Mail.src/M000126.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000126.html');return false;">
          <span class="method-name">clear</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000090" class="method-detail">
        <a name="M000090"></a>

        <div class="method-heading">
          <span class="method-name">content_disposition</span><span class="method-args">( default = nil )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000089">disposition</a>
</p>
        </div>
      </div>

      <div id="method-M000094" class="method-detail">
        <a name="M000094"></a>

        <div class="method-heading">
          <span class="method-name">content_disposition=</span><span class="method-args">( str, params = nil )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000091">set_disposition</a>
</p>
        </div>
      </div>

      <div id="method-M000087" class="method-detail">
        <a name="M000087"></a>

        <div class="method-heading">
          <span class="method-name">content_transfer_encoding</span><span class="method-args">( default = nil )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000083">transfer_encoding</a>
</p>
        </div>
      </div>

      <div id="method-M000088" class="method-detail">
        <a name="M000088"></a>

        <div class="method-heading">
          <span class="method-name">content_transfer_encoding=</span><span class="method-args">( str )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000083">transfer_encoding</a>=
</p>
        </div>
      </div>

      <div id="method-M000075" class="method-detail">
        <a name="M000075"></a>

        <div class="method-heading">
          <a href="Mail.src/M000075.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000075.html');return false;">
          <span class="method-name">content_type</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the current &quot;Content-Type&quot; of the mail instance.
</p>
<p>
If the <a href="Mail.html#M000075">content_type</a> field does not exist,
returns nil by default or you can pass in as the parameter for what you
want the default value <a href="Mail.html#M000045">to</a> be.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.content_type #=&gt; nil
 mail.content_type([]) #=&gt; []
 mail = TMail::Mail.load(&quot;../test/fixtures/raw_email&quot;)
 mail.content_type #=&gt; &quot;text/plain&quot;
</pre>
        </div>
      </div>

      <div id="method-M000079" class="method-detail">
        <a name="M000079"></a>

        <div class="method-heading">
          <span class="method-name">content_type=</span><span class="method-args">( str, sub = nil, param = nil )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000078">set_content_type</a>
</p>
        </div>
      </div>

      <div id="method-M000146" class="method-detail">
        <a name="M000146"></a>

        <div class="method-heading">
          <a href="Mail.src/M000146.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000146.html');return false;">
          <span class="method-name">content_type_is_text?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns true if this part&#8216;s content main type is text, else returns
false. By main type is meant &quot;text/plain&quot; is text.
&quot;text/html&quot; is text
</p>
        </div>
      </div>

      <div id="method-M000107" class="method-detail">
        <a name="M000107"></a>

        <div class="method-heading">
          <a href="Mail.src/M000107.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000107.html');return false;">
          <span class="method-name">create_forward</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates a new email in reply <a href="Mail.html#M000045">to</a> self. Sets
the In-Reply-To and References headers for you automagically.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.load(&quot;my_email&quot;)
 forward_email = mail.create_forward
 forward_email.class         #=&gt; TMail::Mail
 forward_email.content_type  #=&gt; &quot;multipart/mixed&quot;
 forward_email.body          #=&gt; &quot;Attachment: (unnamed)&quot;
 forward_email.encoded       #=&gt; Returns the original email as a MIME attachment
</pre>
        </div>
      </div>

      <div id="method-M000106" class="method-detail">
        <a name="M000106"></a>

        <div class="method-heading">
          <a href="Mail.src/M000106.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000106.html');return false;">
          <span class="method-name">create_reply</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates a new email in reply <a href="Mail.html#M000045">to</a> self. Sets
the In-Reply-To and References headers for you automagically.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.load(&quot;my_email&quot;)
 reply_email = mail.create_reply
 reply_email.class         #=&gt; TMail::Mail
 reply_email.references  #=&gt; [&quot;&lt;d3b8cf8e49f04480850c28713a1f473e@lindsaar.net&gt;&quot;]
 reply_email.in_reply_to #=&gt; [&quot;&lt;d3b8cf8e49f04480850c28713a1f473e@lindsaar.net&gt;&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000036" class="method-detail">
        <a name="M000036"></a>

        <div class="method-heading">
          <a href="Mail.src/M000036.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000036.html');return false;">
          <span class="method-name">date</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the <a href="Mail.html#M000036">date</a> of the email message as
per the &quot;<a href="Mail.html#M000036">date</a>&quot; <a
href="Mail.html#M000113">header</a> value or returns nil by default (if no
<a href="Mail.html#M000036">date</a> field exists).
</p>
<p>
You can also pass whatever default you want into this method and it will
return that instead of nil if there is no <a
href="Mail.html#M000036">date</a> already set.
</p>
        </div>
      </div>

      <div id="method-M000037" class="method-detail">
        <a name="M000037"></a>

        <div class="method-heading">
          <a href="Mail.src/M000037.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000037.html');return false;">
          <span class="method-name">date=</span><span class="method-args">( time )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the <a href="Mail.html#M000036">date</a> of the mail
object with the passed Time instance, returns a Time instance set <a
href="Mail.html#M000045">to</a> the date/time of the mail
</p>
<p>
Example:
</p>
<pre>
 now = Time.now
 mail.date = now
 mail.date #=&gt; Sat Nov 03 18:47:50 +1100 2007
 mail.date.class #=&gt; Time
</pre>
        </div>
      </div>

      <div id="method-M000127" class="method-detail">
        <a name="M000127"></a>

        <div class="method-heading">
          <a href="Mail.src/M000127.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000127.html');return false;">
          <span class="method-name">delete</span><span class="method-args">( key )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000128" class="method-detail">
        <a name="M000128"></a>

        <div class="method-heading">
          <a href="Mail.src/M000128.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000128.html');return false;">
          <span class="method-name">delete_if</span><span class="method-args">() {|key, v| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000151" class="method-detail">
        <a name="M000151"></a>

        <div class="method-heading">
          <a href="Mail.src/M000151.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000151.html');return false;">
          <span class="method-name">delete_no_send_fields</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000100" class="method-detail">
        <a name="M000100"></a>

        <div class="method-heading">
          <a href="Mail.src/M000100.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000100.html');return false;">
          <span class="method-name">destinations</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of <a href="Mail.html#M000135">each</a> destination in the
email message including <a href="Mail.html#M000045">to</a>: <a
href="Mail.html#M000046">cc</a>: or <a href="Mail.html#M000047">bcc</a>:
</p>
<p>
Example:
</p>
<pre>
 mail.to = &quot;Mikel &lt;mikel@lindsaar.net&gt;&quot;
 mail.cc = &quot;Trans &lt;t@t.com&gt;&quot;
 mail.bcc = &quot;bob &lt;bob@me.com&gt;&quot;
 mail.destinations #=&gt; [&quot;mikel@lindsaar.net&quot;, &quot;t@t.com&quot;, &quot;bob@me.com&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000089" class="method-detail">
        <a name="M000089"></a>

        <div class="method-heading">
          <a href="Mail.src/M000089.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000089.html');return false;">
          <span class="method-name">disposition</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the content-<a href="Mail.html#M000089">disposition</a> of the mail
object, returns nil or the passed default value if given
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.load(&quot;path_to/raw_mail_with_attachment&quot;)
 mail.disposition #=&gt; &quot;attachment&quot;

 mail = TMail::Mail.load(&quot;path_to/plain_simple_email&quot;)
 mail.disposition #=&gt; nil
 mail.disposition(false) #=&gt; false
</pre>
        </div>
      </div>

      <div id="method-M000092" class="method-detail">
        <a name="M000092"></a>

        <div class="method-heading">
          <span class="method-name">disposition=</span><span class="method-args">( str, params = nil )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000091">set_disposition</a>
</p>
        </div>
      </div>

      <div id="method-M000145" class="method-detail">
        <a name="M000145"></a>

        <div class="method-heading">
          <a href="Mail.src/M000145.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000145.html');return false;">
          <span class="method-name">disposition_is_attachment?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns true if the content type of this part of the email is a <a
href="Mail.html#M000089">disposition</a> attachment
</p>
        </div>
      </div>

      <div id="method-M000095" class="method-detail">
        <a name="M000095"></a>

        <div class="method-heading">
          <a href="Mail.src/M000095.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000095.html');return false;">
          <span class="method-name">disposition_param</span><span class="method-args">( name, default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the value of a parameter in an existing content-<a
href="Mail.html#M000089">disposition</a> <a
href="Mail.html#M000113">header</a>
</p>
<p>
Example:
</p>
<pre>
 mail.set_disposition(&quot;attachment&quot;, {:filename =&gt; &quot;test.rb&quot;})
 mail['content-disposition'].to_s #=&gt; &quot;attachment; filename=test.rb&quot;
 mail.disposition_param(&quot;filename&quot;) #=&gt; &quot;test.rb&quot;
 mail.disposition_param(&quot;missing_param_key&quot;) #=&gt; nil
 mail.disposition_param(&quot;missing_param_key&quot;, false) #=&gt; false
 mail.disposition_param(&quot;missing_param_key&quot;, &quot;Nothing to see here&quot;) #=&gt; &quot;Nothing to see here&quot;
</pre>
        </div>
      </div>

      <div id="method-M000135" class="method-detail">
        <a name="M000135"></a>

        <div class="method-heading">
          <a href="Mail.src/M000135.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000135.html');return false;">
          <span class="method-name">each</span><span class="method-args">( &amp;block )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000102" class="method-detail">
        <a name="M000102"></a>

        <div class="method-heading">
          <span class="method-name">each_dest</span><span class="method-args">( &amp;block )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000101">each_destination</a>
</p>
        </div>
      </div>

      <div id="method-M000101" class="method-detail">
        <a name="M000101"></a>

        <div class="method-heading">
          <a href="Mail.src/M000101.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000101.html');return false;">
          <span class="method-name">each_destination</span><span class="method-args">( ) {|i| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Yields a block of destination, yielding <a
href="Mail.html#M000135">each</a> as a string.
</p>
<pre>
 (from the destinations example)
 mail.each_destination { |d| puts &quot;#{d.class}: #{d}&quot; }
 String: mikel@lindsaar.net
 String: t@t.com
 String: bob@me.com
</pre>
        </div>
      </div>

      <div id="method-M000123" class="method-detail">
        <a name="M000123"></a>

        <div class="method-heading">
          <a href="Mail.src/M000123.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000123.html');return false;">
          <span class="method-name">each_field</span><span class="method-args">( &amp;block )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000119" class="method-detail">
        <a name="M000119"></a>

        <div class="method-heading">
          <a href="Mail.src/M000119.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000119.html');return false;">
          <span class="method-name">each_header</span><span class="method-args">() {|key, v| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Allows you <a href="Mail.html#M000045">to</a> loop through <a
href="Mail.html#M000135">each</a> <a href="Mail.html#M000113">header</a> in
the <a href="Mail.html">TMail::Mail</a> object in a block Example:
</p>
<pre>
  @mail['to'] = 'mikel@elsewhere.org'
  @mail['from'] = 'me@me.com'
  @mail.each_header { |k,v| puts &quot;#{k} = #{v}&quot; }
  # =&gt; from = me@me.com
  # =&gt; to = mikel@elsewhere.org
</pre>
        </div>
      </div>

      <div id="method-M000121" class="method-detail">
        <a name="M000121"></a>

        <div class="method-heading">
          <a href="Mail.src/M000121.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000121.html');return false;">
          <span class="method-name">each_header_name</span><span class="method-args">( &amp;block )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000122" class="method-detail">
        <a name="M000122"></a>

        <div class="method-heading">
          <span class="method-name">each_key</span><span class="method-args">( &amp;block )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000121">each_header_name</a>
</p>
        </div>
      </div>

      <div id="method-M000120" class="method-detail">
        <a name="M000120"></a>

        <div class="method-heading">
          <span class="method-name">each_pair</span><span class="method-args">()</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000119">each_header</a>
</p>
        </div>
      </div>

      <div id="method-M000144" class="method-detail">
        <a name="M000144"></a>

        <div class="method-heading">
          <a href="Mail.src/M000144.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000144.html');return false;">
          <span class="method-name">each_part</span><span class="method-args">( &amp;block )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000124" class="method-detail">
        <a name="M000124"></a>

        <div class="method-heading">
          <span class="method-name">each_value</span><span class="method-args">( &amp;block )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000123">each_field</a>
</p>
        </div>
      </div>

      <div id="method-M000085" class="method-detail">
        <a name="M000085"></a>

        <div class="method-heading">
          <span class="method-name">encoding</span><span class="method-args">( default = nil )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000083">transfer_encoding</a>
</p>
        </div>
      </div>

      <div id="method-M000086" class="method-detail">
        <a name="M000086"></a>

        <div class="method-heading">
          <span class="method-name">encoding=</span><span class="method-args">( str )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000083">transfer_encoding</a>=
</p>
        </div>
      </div>

      <div id="method-M000141" class="method-detail">
        <a name="M000141"></a>

        <div class="method-heading">
          <a href="Mail.src/M000141.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000141.html');return false;">
          <span class="method-name">epilogue</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000142" class="method-detail">
        <a name="M000142"></a>

        <div class="method-heading">
          <a href="Mail.src/M000142.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000142.html');return false;">
          <span class="method-name">epilogue=</span><span class="method-args">( str )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000104" class="method-detail">
        <a name="M000104"></a>

        <div class="method-heading">
          <a href="Mail.src/M000104.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000104.html');return false;">
          <span class="method-name">error_reply_addresses</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the &quot;<a href="Mail.html#M000062">sender</a>&quot; field as an
array -&gt; useful <a href="Mail.html#M000045">to</a> find out who <a
href="Mail.html#M000045">to</a> send an error email <a
href="Mail.html#M000045">to</a>.
</p>
        </div>
      </div>

      <div id="method-M000116" class="method-detail">
        <a name="M000116"></a>

        <div class="method-heading">
          <span class="method-name">fetch</span><span class="method-args">( key )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for #[]
</p>
        </div>
      </div>

      <div id="method-M000055" class="method-detail">
        <a name="M000055"></a>

        <div class="method-heading">
          <a href="Mail.src/M000055.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000055.html');return false;">
          <span class="method-name">friendly_from</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the &quot;friendly&quot; human readable part of the address
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.from = &quot;Mikel Lindsaar &lt;mikel@abc.com&gt;&quot;
 mail.friendly_from #=&gt; &quot;Mikel Lindsaar&quot;
</pre>
        </div>
      </div>

      <div id="method-M000053" class="method-detail">
        <a name="M000053"></a>

        <div class="method-heading">
          <a href="Mail.src/M000053.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000053.html');return false;">
          <span class="method-name">from</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns who the email is <a href="Mail.html#M000053">from</a> as an Array
of email address strings instead <a href="Mail.html#M000045">to</a> an
Array of <a href="Address.html">TMail::Address</a> objects which is what <a
href="Mail.html#M000051">Mail#from_addrs</a> returns
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.from = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.from #=&gt;  [&quot;mikel@me.org&quot;, &quot;mikel@you.org&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000054" class="method-detail">
        <a name="M000054"></a>

        <div class="method-heading">
          <a href="Mail.src/M000054.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000054.html');return false;">
          <span class="method-name">from=</span><span class="method-args">( *strs )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the &quot;From:&quot; field <a
href="Mail.html#M000045">to</a> the passed array of strings (which should
be valid email addresses)
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.from = [&quot;mikel@abc.com&quot;, &quot;Mikel &lt;mikel@xyz.com&gt;&quot;]
 mail.from #=&gt;  [&quot;mikel@abc.org&quot;, &quot;mikel@xyz.org&quot;]
 mail['from'].to_s #=&gt; &quot;mikel@abc.com, Mikel &lt;mikel@xyz.com&gt;&quot;
</pre>
        </div>
      </div>

      <div id="method-M000051" class="method-detail">
        <a name="M000051"></a>

        <div class="method-heading">
          <a href="Mail.src/M000051.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000051.html');return false;">
          <span class="method-name">from_addrs</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return a TMail::Addresses instance for <a href="Mail.html#M000135">each</a>
entry in the &quot;From:&quot; field of the mail object <a
href="Mail.html#M000113">header</a>.
</p>
<p>
If the &quot;From:&quot; field does not exist, will return nil by default
or the value you pass as the optional parameter.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.from_addrs #=&gt; nil
 mail.from_addrs([]) #=&gt; []
 mail.from = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.from_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000052" class="method-detail">
        <a name="M000052"></a>

        <div class="method-heading">
          <a href="Mail.src/M000052.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000052.html');return false;">
          <span class="method-name">from_addrs=</span><span class="method-args">( arg )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively set the <a href="Mail.html#M000045">to</a> value of the
&quot;From:&quot; <a href="Mail.html#M000113">header</a> <a
href="Mail.html#M000045">to</a> equal the passed in string.
</p>
<p>
<a href="../TMail.html">TMail</a> will <a
href="Mail.html#M000109">parse</a> your contents and turn <a
href="Mail.html#M000135">each</a> valid email address into a <a
href="Address.html">TMail::Address</a> object before assigning it <a
href="Mail.html#M000045">to</a> the mail message.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.from_addrs = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.from_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000032" class="method-detail">
        <a name="M000032"></a>

        <div class="method-heading">
          <a href="Mail.src/M000032.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000032.html');return false;">
          <span class="method-name">has_attachments?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000113" class="method-detail">
        <a name="M000113"></a>

        <div class="method-heading">
          <a href="Mail.src/M000113.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000113.html');return false;">
          <span class="method-name">header</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000035" class="method-detail">
        <a name="M000035"></a>

        <div class="method-heading">
          <a href="Mail.src/M000035.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000035.html');return false;">
          <span class="method-name">header_string</span><span class="method-args">( name, default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Allows you <a href="Mail.html#M000045">to</a> query the mail object with a
string <a href="Mail.html#M000045">to</a> get the contents of the field you
want.
</p>
<p>
Returns a string of the exact contents of the field
</p>
<pre>
 mail.from = &quot;mikel &lt;mikel@lindsaar.net&gt;&quot;
 mail.header_string(&quot;From&quot;) #=&gt; &quot;mikel &lt;mikel@lindsaar.net&gt;&quot;
</pre>
        </div>
      </div>

      <div id="method-M000069" class="method-detail">
        <a name="M000069"></a>

        <div class="method-heading">
          <a href="Mail.src/M000069.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000069.html');return false;">
          <span class="method-name">in_reply_to</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the &quot;In-Reply-To:&quot; field contents as an array of this
mail instance if it exists
</p>
<p>
If the <a href="Mail.html#M000069">in_reply_to</a> field does not exist,
returns nil by default or you can pass in as the parameter for what you
want the default value <a href="Mail.html#M000045">to</a> be.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.in_reply_to #=&gt; nil
 mail.in_reply_to([]) #=&gt; []
 TMail::Mail.load(&quot;../test/fixtures/raw_email_reply&quot;)
 mail.in_reply_to #=&gt; [&quot;&lt;348F04F142D69C21-291E56D292BC@xxxx.net&gt;&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000070" class="method-detail">
        <a name="M000070"></a>

        <div class="method-heading">
          <a href="Mail.src/M000070.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000070.html');return false;">
          <span class="method-name">in_reply_to=</span><span class="method-args">( *idstrs )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the value of the &quot;In-Reply-To:&quot; field of an
email.
</p>
<p>
Accepts an array of a single string of a message id
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.in_reply_to = [&quot;&lt;348F04F142D69C21-291E56D292BC@xxxx.net&gt;&quot;]
 mail.in_reply_to #=&gt; [&quot;&lt;348F04F142D69C21-291E56D292BC@xxxx.net&gt;&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000132" class="method-detail">
        <a name="M000132"></a>

        <div class="method-heading">
          <span class="method-name">indexes</span><span class="method-args">( *args )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000131">values_at</a>
</p>
        </div>
      </div>

      <div id="method-M000133" class="method-detail">
        <a name="M000133"></a>

        <div class="method-heading">
          <span class="method-name">indices</span><span class="method-args">( *args )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000131">values_at</a>
</p>
        </div>
      </div>

      <div id="method-M000110" class="method-detail">
        <a name="M000110"></a>

        <div class="method-heading">
          <a href="Mail.src/M000110.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000110.html');return false;">
          <span class="method-name">inspect</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000130" class="method-detail">
        <a name="M000130"></a>

        <div class="method-heading">
          <a href="Mail.src/M000130.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000130.html');return false;">
          <span class="method-name">key?</span><span class="method-args">( key )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000129" class="method-detail">
        <a name="M000129"></a>

        <div class="method-heading">
          <a href="Mail.src/M000129.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000129.html');return false;">
          <span class="method-name">keys</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000076" class="method-detail">
        <a name="M000076"></a>

        <div class="method-heading">
          <a href="Mail.src/M000076.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000076.html');return false;">
          <span class="method-name">main_type</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the current main type of the &quot;Content-Type&quot; of the mail
instance.
</p>
<p>
If the <a href="Mail.html#M000075">content_type</a> field does not exist,
returns nil by default or you can pass in as the parameter for what you
want the default value <a href="Mail.html#M000045">to</a> be.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.main_type #=&gt; nil
 mail.main_type([]) #=&gt; []
 mail = TMail::Mail.load(&quot;../test/fixtures/raw_email&quot;)
 mail.main_type #=&gt; &quot;text&quot;
</pre>
        </div>
      </div>

      <div id="method-M000067" class="method-detail">
        <a name="M000067"></a>

        <div class="method-heading">
          <a href="Mail.src/M000067.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000067.html');return false;">
          <span class="method-name">message_id</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the message ID for this mail object instance.
</p>
<p>
If the <a href="Mail.html#M000067">message_id</a> field does not exist,
returns nil by default or you can pass in as the parameter for what you
want the default value <a href="Mail.html#M000045">to</a> be.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.message_id #=&gt; nil
 mail.message_id(TMail.new_message_id) #=&gt; &quot;&lt;47404c5326d9c_2ad4fbb80161@baci.local.tmail&gt;&quot;
 mail.message_id = TMail.new_message_id
 mail.message_id #=&gt; &quot;&lt;47404c5326d9c_2ad4fbb80161@baci.local.tmail&gt;&quot;
</pre>
        </div>
      </div>

      <div id="method-M000068" class="method-detail">
        <a name="M000068"></a>

        <div class="method-heading">
          <a href="Mail.src/M000068.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000068.html');return false;">
          <span class="method-name">message_id=</span><span class="method-args">( str )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the message ID of the mail object instance <a
href="Mail.html#M000045">to</a> the passed in string
</p>
<p>
Invalid message IDs are ignored (silently, unless configured otherwise) and
result in a nil message ID. Left and right angle brackets are required.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.message_id = &quot;&lt;348F04F142D69C21-291E56D292BC@xxxx.net&gt;&quot;
 mail.message_id #=&gt; &quot;&lt;348F04F142D69C21-291E56D292BC@xxxx.net&gt;&quot;
 mail.message_id = &quot;this_is_my_badly_formatted_message_id&quot;
 mail.message_id #=&gt; nil
</pre>
        </div>
      </div>

      <div id="method-M000154" class="method-detail">
        <a name="M000154"></a>

        <div class="method-heading">
          <a href="Mail.src/M000154.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000154.html');return false;">
          <span class="method-name">mime_encode</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000157" class="method-detail">
        <a name="M000157"></a>

        <div class="method-heading">
          <a href="Mail.src/M000157.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000157.html');return false;">
          <span class="method-name">mime_encode_binary</span><span class="method-args">( body )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000158" class="method-detail">
        <a name="M000158"></a>

        <div class="method-heading">
          <a href="Mail.src/M000158.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000158.html');return false;">
          <span class="method-name">mime_encode_multipart</span><span class="method-args">( top = true )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000155" class="method-detail">
        <a name="M000155"></a>

        <div class="method-heading">
          <a href="Mail.src/M000155.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000155.html');return false;">
          <span class="method-name">mime_encode_singlepart</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000156" class="method-detail">
        <a name="M000156"></a>

        <div class="method-heading">
          <a href="Mail.src/M000156.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000156.html');return false;">
          <span class="method-name">mime_encode_text</span><span class="method-args">( body )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000073" class="method-detail">
        <a name="M000073"></a>

        <div class="method-heading">
          <a href="Mail.src/M000073.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000073.html');return false;">
          <span class="method-name">mime_version</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the listed MIME version of this email <a
href="Mail.html#M000053">from</a> the &quot;Mime-Version:&quot; <a
href="Mail.html#M000113">header</a> field
</p>
<p>
If the <a href="Mail.html#M000073">mime_version</a> field does not exist,
returns nil by default or you can pass in as the parameter for what you
want the default value <a href="Mail.html#M000045">to</a> be.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.mime_version #=&gt; nil
 mail.mime_version([]) #=&gt; []
 mail = TMail::Mail.load(&quot;../test/fixtures/raw_email&quot;)
 mail.mime_version #=&gt; &quot;1.0&quot;
</pre>
        </div>
      </div>

      <div id="method-M000074" class="method-detail">
        <a name="M000074"></a>

        <div class="method-heading">
          <a href="Mail.src/M000074.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000074.html');return false;">
          <span class="method-name">mime_version=</span><span class="method-args">( m, opt = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000105" class="method-detail">
        <a name="M000105"></a>

        <div class="method-heading">
          <a href="Mail.src/M000105.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000105.html');return false;">
          <span class="method-name">multipart?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns true if the <a href="Mail.html">Mail</a> object is a multipart
message
</p>
        </div>
      </div>

      <div id="method-M000125" class="method-detail">
        <a name="M000125"></a>

        <div class="method-heading">
          <a href="Mail.src/M000125.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000125.html');return false;">
          <span class="method-name">ordered_each</span><span class="method-args">() {|name, v| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000143" class="method-detail">
        <a name="M000143"></a>

        <div class="method-heading">
          <a href="Mail.src/M000143.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000143.html');return false;">
          <span class="method-name">parts</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000139" class="method-detail">
        <a name="M000139"></a>

        <div class="method-heading">
          <span class="method-name">preamble</span><span class="method-args">()</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000136">quoted_body</a>
</p>
        </div>
      </div>

      <div id="method-M000140" class="method-detail">
        <a name="M000140"></a>

        <div class="method-heading">
          <span class="method-name">preamble=</span><span class="method-args">(str)</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000136">quoted_body</a>=
</p>
        </div>
      </div>

      <div id="method-M000136" class="method-detail">
        <a name="M000136"></a>

        <div class="method-heading">
          <a href="Mail.src/M000136.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000136.html');return false;">
          <span class="method-name">quoted_body</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000137" class="method-detail">
        <a name="M000137"></a>

        <div class="method-heading">
          <a href="Mail.src/M000137.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000137.html');return false;">
          <span class="method-name">quoted_body=</span><span class="method-args">(str)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000065" class="method-detail">
        <a name="M000065"></a>

        <div class="method-heading">
          <span class="method-name">quoted_subject</span><span class="method-args">( default = nil )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000064">subject</a>
</p>
        </div>
      </div>

      <div id="method-M000150" class="method-detail">
        <a name="M000150"></a>

        <div class="method-heading">
          <a href="Mail.src/M000150.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000150.html');return false;">
          <span class="method-name">ready_to_send</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000071" class="method-detail">
        <a name="M000071"></a>

        <div class="method-heading">
          <a href="Mail.src/M000071.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000071.html');return false;">
          <span class="method-name">references</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the <a href="Mail.html#M000071">references</a> of this email (prior
messages relating <a href="Mail.html#M000045">to</a> this message) as an
array of message ID strings. Useful when you are trying <a
href="Mail.html#M000045">to</a> thread an email.
</p>
<p>
If the <a href="Mail.html#M000071">references</a> field does not exist,
returns nil by default or you can pass in as the parameter for what you
want the default value <a href="Mail.html#M000045">to</a> be.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.references #=&gt; nil
 mail.references([]) #=&gt; []
 mail = TMail::Mail.load(&quot;../test/fixtures/raw_email_reply&quot;)
 mail.references #=&gt; [&quot;&lt;473FF3B8.9020707@xxx.org&gt;&quot;, &quot;&lt;348F04F142D69C21-291E56D292BC@xxxx.net&gt;&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000072" class="method-detail">
        <a name="M000072"></a>

        <div class="method-heading">
          <a href="Mail.src/M000072.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000072.html');return false;">
          <span class="method-name">references=</span><span class="method-args">( *strs )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the value of the &quot;References:&quot; field of an
email.
</p>
<p>
Accepts an array of strings of message IDs
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.references = [&quot;&lt;348F04F142D69C21-291E56D292BC@xxxx.net&gt;&quot;]
 mail.references #=&gt; [&quot;&lt;348F04F142D69C21-291E56D292BC@xxxx.net&gt;&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000103" class="method-detail">
        <a name="M000103"></a>

        <div class="method-heading">
          <a href="Mail.src/M000103.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000103.html');return false;">
          <span class="method-name">reply_addresses</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of reply <a href="Mail.html#M000045">to</a> addresses that
the <a href="Mail.html">Mail</a> object has, or if the <a
href="Mail.html">Mail</a> message has no reply-<a
href="Mail.html#M000045">to</a>, returns an array of the <a
href="Mail.html">Mail</a> objects <a href="Mail.html#M000053">from</a>
addresses. Else returns the default which can either be passed as a
parameter or defaults <a href="Mail.html#M000045">to</a> nil
</p>
<p>
Example:
</p>
<pre>
 mail.from = &quot;Mikel &lt;mikel@lindsaar.net&gt;&quot;
 mail.reply_to = nil
 mail.reply_addresses #=&gt; [&quot;&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000058" class="method-detail">
        <a name="M000058"></a>

        <div class="method-heading">
          <a href="Mail.src/M000058.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000058.html');return false;">
          <span class="method-name">reply_to</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns who the email is <a href="Mail.html#M000053">from</a> as an Array
of email address strings instead <a href="Mail.html#M000045">to</a> an
Array of <a href="Address.html">TMail::Address</a> objects which is what <a
href="Mail.html#M000056">Mail#reply_to_addrs</a> returns
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.reply_to = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.reply_to #=&gt;  [&quot;mikel@me.org&quot;, &quot;mikel@you.org&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000059" class="method-detail">
        <a name="M000059"></a>

        <div class="method-heading">
          <a href="Mail.src/M000059.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000059.html');return false;">
          <span class="method-name">reply_to=</span><span class="method-args">( *strs )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the &quot;Reply-To:&quot; field <a
href="Mail.html#M000045">to</a> the passed array of strings (which should
be valid email addresses)
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.reply_to = [&quot;mikel@abc.com&quot;, &quot;Mikel &lt;mikel@xyz.com&gt;&quot;]
 mail.reply_to #=&gt;  [&quot;mikel@abc.org&quot;, &quot;mikel@xyz.org&quot;]
 mail['reply_to'].to_s #=&gt; &quot;mikel@abc.com, Mikel &lt;mikel@xyz.com&gt;&quot;
</pre>
        </div>
      </div>

      <div id="method-M000056" class="method-detail">
        <a name="M000056"></a>

        <div class="method-heading">
          <a href="Mail.src/M000056.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000056.html');return false;">
          <span class="method-name">reply_to_addrs</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return a TMail::Addresses instance for <a href="Mail.html#M000135">each</a>
entry in the &quot;Reply-To:&quot; field of the mail object <a
href="Mail.html#M000113">header</a>.
</p>
<p>
If the &quot;Reply-To:&quot; field does not exist, will return nil by
default or the value you pass as the optional parameter.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.reply_to_addrs #=&gt; nil
 mail.reply_to_addrs([]) #=&gt; []
 mail.reply_to = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.reply_to_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000057" class="method-detail">
        <a name="M000057"></a>

        <div class="method-heading">
          <a href="Mail.src/M000057.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000057.html');return false;">
          <span class="method-name">reply_to_addrs=</span><span class="method-args">( arg )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively set the <a href="Mail.html#M000045">to</a> value of the
&quot;Reply-To:&quot; <a href="Mail.html#M000113">header</a> <a
href="Mail.html#M000045">to</a> equal the passed in argument.
</p>
<p>
<a href="../TMail.html">TMail</a> will <a
href="Mail.html#M000109">parse</a> your contents and turn <a
href="Mail.html#M000135">each</a> valid email address into a <a
href="Address.html">TMail::Address</a> object before assigning it <a
href="Mail.html#M000045">to</a> the mail message.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.reply_to_addrs = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.reply_to_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000148" class="method-detail">
        <a name="M000148"></a>

        <div class="method-heading">
          <a href="Mail.src/M000148.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000148.html');return false;">
          <span class="method-name">send_text_to</span><span class="method-args">( smtp )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000147" class="method-detail">
        <a name="M000147"></a>

        <div class="method-heading">
          <a href="Mail.src/M000147.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000147.html');return false;">
          <span class="method-name">send_to</span><span class="method-args">( smtp )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000149" class="method-detail">
        <a name="M000149"></a>

        <div class="method-heading">
          <a href="Mail.src/M000149.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000149.html');return false;">
          <span class="method-name">send_to_0</span><span class="method-args">( smtp, from, to )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000062" class="method-detail">
        <a name="M000062"></a>

        <div class="method-heading">
          <a href="Mail.src/M000062.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000062.html');return false;">
          <span class="method-name">sender</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns who the <a href="Mail.html#M000062">sender</a> of this mail is as
string instead <a href="Mail.html#M000045">to</a> an Array of <a
href="Address.html">TMail::Address</a> objects which is what <a
href="Mail.html#M000060">Mail#sender_addr</a> returns
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.sender = &quot;Mikel &lt;mikel@me.org&gt;&quot;
 mail.sender #=&gt;  &quot;mikel@me.org&quot;
</pre>
        </div>
      </div>

      <div id="method-M000063" class="method-detail">
        <a name="M000063"></a>

        <div class="method-heading">
          <a href="Mail.src/M000063.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000063.html');return false;">
          <span class="method-name">sender=</span><span class="method-args">( str )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the &quot;Sender:&quot; field <a
href="Mail.html#M000045">to</a> the passed string (which should be a valid
email address)
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.sender = &quot;mikel@abc.com&quot;
 mail.sender #=&gt;  &quot;mikel@abc.org&quot;
 mail['sender'].to_s #=&gt; &quot;mikel@abc.com&quot;
</pre>
        </div>
      </div>

      <div id="method-M000060" class="method-detail">
        <a name="M000060"></a>

        <div class="method-heading">
          <a href="Mail.src/M000060.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000060.html');return false;">
          <span class="method-name">sender_addr</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return a TMail::Addresses instance of the &quot;Sender:&quot; field of the
mail object <a href="Mail.html#M000113">header</a>.
</p>
<p>
If the &quot;Sender:&quot; field does not exist, will return nil by default
or the value you pass as the optional parameter.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.sender #=&gt; nil
 mail.sender([]) #=&gt; []
 mail.sender = &quot;Mikel &lt;mikel@me.org&gt;&quot;
 mail.reply_to_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000061" class="method-detail">
        <a name="M000061"></a>

        <div class="method-heading">
          <a href="Mail.src/M000061.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000061.html');return false;">
          <span class="method-name">sender_addr=</span><span class="method-args">( addr )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively set the <a href="Mail.html#M000045">to</a> value of the
&quot;Sender:&quot; <a href="Mail.html#M000113">header</a> <a
href="Mail.html#M000045">to</a> equal the passed in argument.
</p>
<p>
<a href="../TMail.html">TMail</a> will <a
href="Mail.html#M000109">parse</a> your contents and turn <a
href="Mail.html#M000135">each</a> valid email address into a <a
href="Address.html">TMail::Address</a> object before assigning it <a
href="Mail.html#M000045">to</a> the mail message.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.sender_addrs = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.sender_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000093" class="method-detail">
        <a name="M000093"></a>

        <div class="method-heading">
          <span class="method-name">set_content_disposition</span><span class="method-args">( str, params = nil )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Mail.html#M000091">set_disposition</a>
</p>
        </div>
      </div>

      <div id="method-M000078" class="method-detail">
        <a name="M000078"></a>

        <div class="method-heading">
          <a href="Mail.src/M000078.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000078.html');return false;">
          <span class="method-name">set_content_type</span><span class="method-args">( str, sub = nil, param = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the &quot;Content-Type:&quot; <a
href="Mail.html#M000113">header</a> field of this mail object
</p>
<p>
Allows you <a href="Mail.html#M000045">to</a> set the main type, sub type
as well as parameters <a href="Mail.html#M000045">to</a> the field. The
main type and sub type need <a href="Mail.html#M000045">to</a> be a string.
</p>
<p>
The optional params hash can be passed with <a
href="Mail.html#M000129">keys</a> as symbols and values as a string, or
strings as <a href="Mail.html#M000129">keys</a> and values.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.set_content_type(&quot;text&quot;, &quot;plain&quot;)
 mail.to_s #=&gt; &quot;Content-Type: text/plain\n\n&quot;

 mail.set_content_type(&quot;text&quot;, &quot;plain&quot;, {:charset =&gt; &quot;EUC-KR&quot;, :format =&gt; &quot;flowed&quot;})
 mail.to_s #=&gt; &quot;Content-Type: text/plain; charset=EUC-KR; format=flowed\n\n&quot;

 mail.set_content_type(&quot;text&quot;, &quot;plain&quot;, {&quot;charset&quot; =&gt; &quot;EUC-KR&quot;, &quot;format&quot; =&gt; &quot;flowed&quot;})
 mail.to_s #=&gt; &quot;Content-Type: text/plain; charset=EUC-KR; format=flowed\n\n&quot;
</pre>
        </div>
      </div>

      <div id="method-M000091" class="method-detail">
        <a name="M000091"></a>

        <div class="method-heading">
          <a href="Mail.src/M000091.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000091.html');return false;">
          <span class="method-name">set_disposition</span><span class="method-args">( str, params = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Allows you <a href="Mail.html#M000045">to</a> set the content-<a
href="Mail.html#M000089">disposition</a> of the mail object. Accepts a type
and a hash of parameters.
</p>
<p>
Example:
</p>
<pre>
 mail.set_disposition(&quot;attachment&quot;, {:filename =&gt; &quot;test.rb&quot;})
 mail.disposition #=&gt; &quot;attachment&quot;
 mail['content-disposition'].to_s #=&gt; &quot;attachment; filename=test.rb&quot;
</pre>
        </div>
      </div>

      <div id="method-M000118" class="method-detail">
        <a name="M000118"></a>

        <div class="method-heading">
          <span class="method-name">store</span><span class="method-args">( key, val )</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for #[]=
</p>
        </div>
      </div>

      <div id="method-M000038" class="method-detail">
        <a name="M000038"></a>

        <div class="method-heading">
          <a href="Mail.src/M000038.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000038.html');return false;">
          <span class="method-name">strftime</span><span class="method-args">( fmt, default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the time of the mail message formatted <a
href="Mail.html#M000045">to</a> your taste using a <a
href="Mail.html#M000038">strftime</a> format string. If no <a
href="Mail.html#M000036">date</a> set returns nil by default or whatever
value you pass as the second optional parameter.
</p>
<pre>
 time = Time.now # (on Nov 16 2007)
 mail.date = time
 mail.strftime(&quot;%D&quot;) #=&gt; &quot;11/16/07&quot;
</pre>
        </div>
      </div>

      <div id="method-M000115" class="method-detail">
        <a name="M000115"></a>

        <div class="method-heading">
          <a href="Mail.src/M000115.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000115.html');return false;">
          <span class="method-name">sub_header</span><span class="method-args">(key, param)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000077" class="method-detail">
        <a name="M000077"></a>

        <div class="method-heading">
          <a href="Mail.src/M000077.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000077.html');return false;">
          <span class="method-name">sub_type</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the current sub type of the &quot;Content-Type&quot; of the mail
instance.
</p>
<p>
If the <a href="Mail.html#M000075">content_type</a> field does not exist,
returns nil by default or you can pass in as the parameter for what you
want the default value <a href="Mail.html#M000045">to</a> be.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.sub_type #=&gt; nil
 mail.sub_type([]) #=&gt; []
 mail = TMail::Mail.load(&quot;../test/fixtures/raw_email&quot;)
 mail.sub_type #=&gt; &quot;plain&quot;
</pre>
        </div>
      </div>

      <div id="method-M000064" class="method-detail">
        <a name="M000064"></a>

        <div class="method-heading">
          <a href="Mail.src/M000064.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000064.html');return false;">
          <span class="method-name">subject</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the <a href="Mail.html#M000064">subject</a> of the mail instance.
</p>
<p>
If the <a href="Mail.html#M000064">subject</a> field does not exist,
returns nil by default or you can pass in as the parameter for what you
want the default value <a href="Mail.html#M000045">to</a> be.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.subject #=&gt; nil
 mail.subject(&quot;&quot;) #=&gt; &quot;&quot;
 mail.subject = &quot;Hello&quot;
 mail.subject #=&gt; &quot;Hello&quot;
</pre>
        </div>
      </div>

      <div id="method-M000159" class="method-detail">
        <a name="M000159"></a>

        <div class="method-heading">
          <a href="Mail.src/M000159.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000159.html');return false;">
          <span class="method-name">subject</span><span class="method-args">(to_charset = 'utf-8')</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000066" class="method-detail">
        <a name="M000066"></a>

        <div class="method-heading">
          <a href="Mail.src/M000066.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000066.html');return false;">
          <span class="method-name">subject=</span><span class="method-args">( str )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the passed string as the <a
href="Mail.html#M000064">subject</a> of the mail message.
</p>
<p>
Example
</p>
<pre>
 mail = TMail::Mail.new
 mail.subject #=&gt; &quot;This subject&quot;
 mail.subject = &quot;Another subject&quot;
 mail.subject #=&gt; &quot;Another subject&quot;
</pre>
        </div>
      </div>

      <div id="method-M000045" class="method-detail">
        <a name="M000045"></a>

        <div class="method-heading">
          <a href="Mail.src/M000045.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000045.html');return false;">
          <span class="method-name">to</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns who the email is <a href="Mail.html#M000045">to</a> as an Array of
email addresses as opposed <a href="Mail.html#M000045">to</a> an Array of
<a href="Address.html">TMail::Address</a> objects which is what <a
href="Mail.html#M000039">Mail#to_addrs</a> returns
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.to = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.to #=&gt;  [&quot;mikel@me.org&quot;, &quot;mikel@you.org&quot;]
</pre>
        </div>
      </div>

      <div id="method-M000048" class="method-detail">
        <a name="M000048"></a>

        <div class="method-heading">
          <a href="Mail.src/M000048.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000048.html');return false;">
          <span class="method-name">to=</span><span class="method-args">( *strs )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the &quot;To:&quot; field <a
href="Mail.html#M000045">to</a> the passed array of strings (which should
be valid email addresses)
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.to = [&quot;mikel@abc.com&quot;, &quot;Mikel &lt;mikel@xyz.com&gt;&quot;]
 mail.to #=&gt;  [&quot;mikel@abc.org&quot;, &quot;mikel@xyz.org&quot;]
 mail['to'].to_s #=&gt; &quot;mikel@abc.com, Mikel &lt;mikel@xyz.com&gt;&quot;
</pre>
        </div>
      </div>

      <div id="method-M000039" class="method-detail">
        <a name="M000039"></a>

        <div class="method-heading">
          <a href="Mail.src/M000039.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000039.html');return false;">
          <span class="method-name">to_addrs</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return a TMail::Addresses instance for <a href="Mail.html#M000135">each</a>
entry in the &quot;To:&quot; field of the mail object <a
href="Mail.html#M000113">header</a>.
</p>
<p>
If the &quot;To:&quot; field does not exist, will return nil by default or
the value you pass as the optional parameter.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.to_addrs #=&gt; nil
 mail.to_addrs([]) #=&gt; []
 mail.to = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.to_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000042" class="method-detail">
        <a name="M000042"></a>

        <div class="method-heading">
          <a href="Mail.src/M000042.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000042.html');return false;">
          <span class="method-name">to_addrs=</span><span class="method-args">( arg )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively set the <a href="Mail.html#M000045">to</a> field of the
&quot;To:&quot; <a href="Mail.html#M000113">header</a> <a
href="Mail.html#M000045">to</a> equal the passed in string.
</p>
<p>
<a href="../TMail.html">TMail</a> will <a
href="Mail.html#M000109">parse</a> your contents and turn <a
href="Mail.html#M000135">each</a> valid email address into a <a
href="Address.html">TMail::Address</a> object before assigning it <a
href="Mail.html#M000045">to</a> the mail message.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.to = &quot;Mikel &lt;mikel@me.org&gt;, another Mikel &lt;mikel@you.org&gt;&quot;
 mail.to_addrs #=&gt;  [#&lt;TMail::Address mikel@me.org&gt;, #&lt;TMail::Address mikel@you.org&gt;]
</pre>
        </div>
      </div>

      <div id="method-M000083" class="method-detail">
        <a name="M000083"></a>

        <div class="method-heading">
          <a href="Mail.src/M000083.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000083.html');return false;">
          <span class="method-name">transfer_encoding</span><span class="method-args">( default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the transfer <a href="Mail.html#M000085">encoding</a> of the email.
Returns nil if no <a href="Mail.html#M000085">encoding</a> set or returns
whatever default you pass as a parameter - note passing the parameter does
NOT change the mail object in any way.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.load(&quot;path_to/base64_encoded_email&quot;)
 mail.transfer_encoding #=&gt; &quot;base64&quot;

 mail = TMail::Mail.new
 mail.transfer_encoding #=&gt; nil
 mail.transfer_encoding(&quot;base64&quot;) #=&gt; &quot;base64&quot;
</pre>
        </div>
      </div>

      <div id="method-M000084" class="method-detail">
        <a name="M000084"></a>

        <div class="method-heading">
          <a href="Mail.src/M000084.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000084.html');return false;">
          <span class="method-name">transfer_encoding=</span><span class="method-args">( str )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Destructively sets the transfer <a href="Mail.html#M000085">encoding</a> of
the mail object <a href="Mail.html#M000045">to</a> the passed string, you
should note though that this does nothing <a
href="Mail.html#M000045">to</a> the mail <a
href="Mail.html#M000161">body</a>, just changes the <a
href="Mail.html#M000113">header</a> value, you will need <a
href="Mail.html#M000045">to</a> encode or decode the <a
href="Mail.html#M000161">body</a> as well <a
href="Mail.html#M000045">to</a> match whatever you put in this <a
href="Mail.html#M000113">header</a> value.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.transfer_encoding #=&gt; nil
 mail.transfer_encoding = &quot;base64&quot;
 mail.transfer_encoding #=&gt; &quot;base64&quot;
</pre>
        </div>
      </div>

      <div id="method-M000080" class="method-detail">
        <a name="M000080"></a>

        <div class="method-heading">
          <a href="Mail.src/M000080.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000080.html');return false;">
          <span class="method-name">type_param</span><span class="method-args">( name, default = nil )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the named type parameter as a string, <a
href="Mail.html#M000053">from</a> the &quot;Content-Type:&quot; <a
href="Mail.html#M000113">header</a>.
</p>
<p>
Example:
</p>
<pre>
 mail = TMail::Mail.new
 mail.type_param(&quot;charset&quot;) #=&gt; nil
 mail.type_param(&quot;charset&quot;, []) #=&gt; []
 mail.set_content_type(&quot;text&quot;, &quot;plain&quot;, {:charset =&gt; &quot;EUC-KR&quot;, :format =&gt; &quot;flowed&quot;})
 mail.type_param(&quot;charset&quot;) #=&gt; &quot;EUC-KR&quot;
 mail.type_param(&quot;format&quot;) #=&gt; &quot;flowed&quot;
</pre>
        </div>
      </div>

      <div id="method-M000160" class="method-detail">
        <a name="M000160"></a>

        <div class="method-heading">
          <a href="Mail.src/M000160.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000160.html');return false;">
          <span class="method-name">unquoted_body</span><span class="method-args">(to_charset = 'utf-8')</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000131" class="method-detail">
        <a name="M000131"></a>

        <div class="method-heading">
          <a href="Mail.src/M000131.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000131.html');return false;">
          <span class="method-name">values_at</span><span class="method-args">( *args )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000111" class="method-detail">
        <a name="M000111"></a>

        <div class="method-heading">
          <a href="Mail.src/M000111.html" target="Code" class="method-signature"
            onclick="popupCode('Mail.src/M000111.html');return false;">
          <span class="method-name">write_back</span><span class="method-args">( eol = &quot;\n&quot;, charset = 'e' )</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>