tmail 1.2.3.1 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. data/README +10 -0
  2. data/ext/tmailscanner/tmail/tmailscanner.c +39 -8
  3. data/lib/tmail.rb +1 -0
  4. data/lib/tmail/address.rb +6 -40
  5. data/lib/tmail/attachments.rb +41 -22
  6. data/lib/tmail/encode.rb +9 -0
  7. data/lib/tmail/header.rb +5 -3
  8. data/lib/tmail/interface.rb +40 -3
  9. data/lib/tmail/mail.rb +3 -3
  10. data/lib/tmail/mailbox.rb +3 -2
  11. data/lib/tmail/net.rb +3 -1
  12. data/lib/tmail/parser.rb +204 -620
  13. data/lib/tmail/parser.y +38 -3
  14. data/lib/tmail/quoting.rb +38 -1
  15. data/lib/tmail/utils.rb +28 -4
  16. data/lib/tmail/vendor/rchardet-1.3/COPYING +504 -0
  17. data/lib/tmail/vendor/rchardet-1.3/README +12 -0
  18. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet.rb +67 -0
  19. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +927 -0
  20. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +42 -0
  21. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +237 -0
  22. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +112 -0
  23. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +75 -0
  24. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +64 -0
  25. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +42 -0
  26. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +90 -0
  27. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +244 -0
  28. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +88 -0
  29. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +596 -0
  30. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +42 -0
  31. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +430 -0
  32. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +42 -0
  33. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +474 -0
  34. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +42 -0
  35. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +289 -0
  36. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +570 -0
  37. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +229 -0
  38. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +229 -0
  39. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +330 -0
  40. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +227 -0
  41. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +202 -0
  42. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +226 -0
  43. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +201 -0
  44. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +147 -0
  45. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +89 -0
  46. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +47 -0
  47. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +542 -0
  48. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +124 -0
  49. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +58 -0
  50. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +88 -0
  51. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +166 -0
  52. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +87 -0
  53. data/lib/tmail/version.rb +1 -1
  54. data/setup.rb +2 -2
  55. data/test/fixtures/apple_unquoted_content_type +44 -0
  56. data/test/fixtures/inline_attachment.txt +2095 -0
  57. data/test/fixtures/iso_8859_1_email_without_encoding_and_message_id.txt +16 -0
  58. data/test/fixtures/mailbox.zip +0 -0
  59. data/test/fixtures/marked_as_iso_8859_1_but_it_is_utf_8.txt +33 -0
  60. data/test/fixtures/marked_as_utf_8_but_it_is_iso_8859_1.txt +56 -0
  61. data/test/fixtures/raw_email_bad_time +62 -0
  62. data/test/fixtures/raw_email_double_at_in_header +14 -0
  63. data/test/fixtures/raw_email_only_attachment +17 -0
  64. data/test/fixtures/raw_email_string_in_date_field +17 -0
  65. data/test/fixtures/raw_email_trailing_dot +21 -0
  66. data/test/fixtures/raw_email_with_quoted_attachment_filename +60 -0
  67. data/test/fixtures/raw_email_with_wrong_splitted_multibyte_encoded_word_subject +15 -0
  68. data/test/fixtures/the_only_part_is_a_word_document.txt +425 -0
  69. data/test/fixtures/unquoted_filename_in_attachment +177 -0
  70. data/test/test_address.rb +114 -92
  71. data/test/test_attachments.rb +84 -1
  72. data/test/test_encode.rb +54 -0
  73. data/test/test_header.rb +60 -2
  74. data/test/test_mail.rb +22 -15
  75. data/test/test_mbox.rb +12 -3
  76. data/test/test_port.rb +13 -9
  77. data/test/test_quote.rb +9 -0
  78. data/tmail.gemspec +34 -0
  79. metadata +68 -167
  80. data/MANIFEST +0 -191
  81. data/log/BugTrackingLog.txt +0 -1231
  82. data/log/Changelog.txt +0 -534
  83. data/log/Fixme.txt +0 -6
  84. data/log/Testlog.txt +0 -2340
  85. data/log/Todo.txt +0 -30
  86. data/log/fixme.rdoc +0 -6
  87. data/meta/MANIFEST +0 -128
  88. data/meta/VERSION +0 -1
  89. data/meta/project.yaml +0 -30
  90. data/meta/unixname +0 -1
  91. data/sample/bench_base64.rb +0 -48
  92. data/sample/data/multipart +0 -23
  93. data/sample/data/normal +0 -29
  94. data/sample/data/sendtest +0 -5
  95. data/sample/data/simple +0 -14
  96. data/sample/data/test +0 -27
  97. data/sample/extract-attachements.rb +0 -33
  98. data/sample/from-check.rb +0 -26
  99. data/sample/multipart.rb +0 -26
  100. data/sample/parse-bench.rb +0 -68
  101. data/sample/parse-test.rb +0 -19
  102. data/sample/sendmail.rb +0 -94
  103. data/site/contributing/index.html +0 -183
  104. data/site/css/clean.css +0 -27
  105. data/site/css/layout.css +0 -31
  106. data/site/css/style.css +0 -60
  107. data/site/download/index.html +0 -61
  108. data/site/img/envelope.jpg +0 -0
  109. data/site/img/mailman.gif +0 -0
  110. data/site/img/stamp-sm.jpg +0 -0
  111. data/site/img/stamp.jpg +0 -0
  112. data/site/img/stampborder.jpg +0 -0
  113. data/site/img/tfire.jpg +0 -0
  114. data/site/img/tmail.png +0 -0
  115. data/site/index.html +0 -270
  116. data/site/js/jquery.js +0 -31
  117. data/site/log/Changelog.xsl +0 -33
  118. data/site/log/changelog.xml +0 -1677
  119. data/site/outdated/BUGS +0 -3
  120. data/site/outdated/DEPENDS +0 -1
  121. data/site/outdated/Incompatibilities +0 -89
  122. data/site/outdated/Incompatibilities.ja +0 -102
  123. data/site/outdated/NEWS +0 -9
  124. data/site/outdated/README.ja +0 -73
  125. data/site/outdated/doc.ja/address.html +0 -275
  126. data/site/outdated/doc.ja/basics.html +0 -405
  127. data/site/outdated/doc.ja/config.html +0 -49
  128. data/site/outdated/doc.ja/details.html +0 -146
  129. data/site/outdated/doc.ja/index.html +0 -39
  130. data/site/outdated/doc.ja/mail.html +0 -793
  131. data/site/outdated/doc.ja/mailbox.html +0 -265
  132. data/site/outdated/doc.ja/port.html +0 -95
  133. data/site/outdated/doc.ja/tmail.html +0 -58
  134. data/site/outdated/doc.ja/usage.html +0 -202
  135. data/site/outdated/rdd/address.rrd.m +0 -229
  136. data/site/outdated/rdd/basics.rd.m +0 -275
  137. data/site/outdated/rdd/config.rrd.m +0 -26
  138. data/site/outdated/rdd/details.rd.m +0 -117
  139. data/site/outdated/rdd/index.rhtml.m +0 -54
  140. data/site/outdated/rdd/mail.rrd.m +0 -701
  141. data/site/outdated/rdd/mailbox.rrd.m +0 -228
  142. data/site/outdated/rdd/port.rrd.m +0 -69
  143. data/site/outdated/rdd/tmail.rrd.m +0 -33
  144. data/site/outdated/rdd/usage.rd.m +0 -247
  145. data/site/quickstart/index.html +0 -69
  146. data/site/quickstart/quickstart.html +0 -52
  147. data/site/quickstart/usage.html +0 -193
  148. data/site/reference/address.html +0 -247
  149. data/site/reference/config.html +0 -30
  150. data/site/reference/index.html +0 -101
  151. data/site/reference/mail.html +0 -726
  152. data/site/reference/mailbox.html +0 -245
  153. data/site/reference/port.html +0 -75
  154. data/site/reference/tmail.html +0 -35
  155. data/work/script/make +0 -26
  156. data/work/script/rdoc +0 -39
  157. data/work/script/setup +0 -1616
  158. data/work/script/test +0 -30
@@ -1,69 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
- <html lang="en">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf8">
5
- <meta http-equiv="Content-Language" content="en">
6
-
7
- <link rel="stylesheet" href="../css/clean.css" type="text/css" media="screen, projection, print"/>
8
- <link rel="stylesheet" href="../css/layout.css" type="text/css" media="screen, projection, print"/>
9
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen, projection, print"/>
10
-
11
- <link rel="icon" href="../img/tfire.jpg" type="image/x-icon"/>
12
-
13
- <title>TMail &mdash; Quick Start Guide</title>
14
-
15
- <script type="text/javascript" src="../js/jquery.js"></script>
16
-
17
- <script>
18
- $(document).ready(function(){
19
- $('#quickstart').load('quickstart.html');
20
- $('#usage').load('usage.html');
21
- });
22
- </script>
23
-
24
- </head>
25
- <body>
26
- <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
27
- </script>
28
- <script type="text/javascript">
29
- _uacct = "UA-2871747-1";
30
- urchinTracker();
31
- </script>
32
-
33
- <div class="container">
34
-
35
- <div class="logo">
36
- <img src="../img/stamp-sm.jpg"/>
37
- </div>
38
-
39
- <div class="title">
40
- <h1>TMail</h1>
41
- <h2>Ruby on Mail</h2>
42
- </div>
43
-
44
- <div class="menu">
45
- &nbsp;
46
- <a href="../index.html">Home</a> &nbsp;&nbsp;
47
- <a href="../quickstart/index.html">Quickstart</a> &nbsp;&nbsp;
48
- <a href="http://lindsaar.net/tmail/" onClick="javascript:urchinTracker('/outgoing/rubyforge.org/blog_page');">Blog</a> &nbsp;&nbsp;
49
- <a href="http://rubyforge.org/frs/?group_id=4512" onClick="javascript:urchinTracker('/outgoing/rubyforge.org/download_page');">Download</a> &nbsp;&nbsp;
50
- <a href="http://rubyforge.org/mailman/listinfo/tmail-talk">Mailing List</a> &nbsp;&nbsp;
51
- <a href="../reference/index.html">Reference</a> &nbsp;&nbsp;
52
- <a href="../rdoc/index.html">RDocs</a> &nbsp;&nbsp;
53
- <a href="http://rubyforge.org/projects/tmail/" onClick="javascript:urchinTracker('/outgoing/rubyforge.org/project_page');">Project</a> &nbsp;&nbsp;
54
- <a href="../contributing/index.html">Contributing</a>
55
- </div>
56
-
57
- <div class="main">
58
- <div id="quickstart"></div>
59
-
60
- <div id="usage" ></div>
61
- </div>
62
-
63
- <div class="footer">
64
- Copyright (c) 2007 TMail Project &reg; All Rights Reserved
65
- </div>
66
-
67
- </div>
68
- </body>
69
- </html>
@@ -1,52 +0,0 @@
1
- <h1>TMail Quick Start Guide</h1>
2
-
3
- <div class="guide">
4
- <p>TMail is an E-Mail handling library. It provides you with access to
5
- any email you wrap it around as an object.</p>
6
-
7
- <h2>Unix like OSes</h2>
8
-
9
- <ol>
10
- <li>
11
- Download the <a href="../download/index.html">
12
- latest release</a> gem from the RubyForge TMail project.
13
- </li>
14
- <li>
15
- Run gem install from the directory where you saved the gem:
16
-
17
- <pre class="shell">
18
- $ gem install tmail
19
- </pre>
20
-
21
- </li>
22
- <li>
23
- That's it!
24
- <br />
25
- <br />
26
- TMail installs into the ruby_lib_path/gems/ folder just like any other
27
- well behaved gem and allows you to require it thusly:<br />
28
- </li>
29
-
30
- <pre class="shell">
31
- irb(main):001:0> require 'rubygems'
32
- irb(main):002:0> require 'tmail'
33
- irb(main):003:0> email = TMail::Mail.load("my_raw_email.txt")
34
- irb(main):004:0> puts email.to
35
- => mikel@example.com
36
- irb(main):005:0> email.to = 'mikel@somewhere.else.com'
37
- => "mikel@somewhere.else.com"
38
- irb(main):006:0> email.cc = 'mikel@another.place.com'
39
- => mikel@another.place.com
40
- irb(main):007:0> email.destinations
41
- => ["mikel@somewhere.else.com", "mikel@another.place.com"]
42
- </pre>
43
-
44
- </ol>
45
-
46
- <h2>UnUnix like OSes (Windows etc)</h2>
47
-
48
- <p>Just do the same as the above... just gem install tmail. If TMail can
49
- find a compiler on your system, it will compile the native C extensions,
50
- if it can't find a compiler, it will just install the Ruby version. Easy
51
- hey?</p>
52
- </div>
@@ -1,193 +0,0 @@
1
- <h1>General Usage</h1>
2
-
3
- <h2>Abstraction</h2>
4
-
5
- <p>
6
- TMail is designed to be an RFC compatible library. The goal of TMail
7
- is to allow you to create emails programatically without having to know
8
- about the RFCs or how they work, or what their standards are.
9
- </p>
10
-
11
- <h2>Getting information from e-mail</h2>
12
-
13
- <h3>class TMail::Mail</h3>
14
-
15
- <p>
16
- When you use TMail, you need to create a TMail object. There are
17
- three ways you can do this, the first is by parsing a string supplied
18
- to TMail, the second is by loading the mail object from a file, and
19
- the third is by opening up a port to whatever mail source you want.
20
- <br />
21
- <br />
22
- For example:
23
- </p>
24
-
25
- <h4>Loading from string:</h4>
26
-
27
- <pre class="ruby">
28
- require 'tmail'
29
-
30
- mail = TMail::Mail.parse(string) # from String
31
- </pre>
32
-
33
- <h4>Loading from a file:</h4>
34
-
35
- <pre class="ruby">
36
- require 'tmail'
37
-
38
- mail = TMail::Mail.load(filename) # from file
39
- </pre>
40
-
41
- <h4>Using the Port abstraction</h4>
42
-
43
- <p>
44
- The third way to get TMail::Mail object is using the "port".
45
- "port" is the abstruction of mail sources, e.g. strings or file names.
46
- You can get ports by using mail loaders (TMail::*Loader classes).
47
- <br />
48
- <br />
49
- Here's simple example:
50
- </p>
51
-
52
- <pre class="ruby">
53
- require 'tmail'
54
-
55
- loader = TMail::MhLoader.new( '/home/aamine/Mail/inbox' )
56
- loader.each_port do |port|
57
- mail = TMail::Mail.new(port)
58
- # ....
59
- end
60
- </pre>
61
-
62
- <p>This lets you cycle through your messages in the inbox</p>
63
-
64
- <h3>Accessing EMail Attributes via TMail::Mail object</h3>
65
-
66
- <p>
67
- Once you have the Email loaded, you can now access the various parts
68
- of the email, using various methods on the now instantiated TMail::Mail
69
- object.
70
- <br />
71
- <br />
72
- For example...
73
- </p>
74
-
75
- <h4>
76
- To get who the email is to:
77
- </h4>
78
-
79
- <pre class="ruby">
80
- require 'tmail'
81
-
82
- mail = TMail::Mail.parse( 'To: Minero Aoki &lt;aamine@loveruby.net&gt;' )
83
- p mail.to # =&gt; ["aamine@loveruby.net"]
84
- </pre>
85
-
86
- <h4>
87
- To get the subject:
88
- </h4>
89
-
90
- <pre class="ruby">
91
- p mail.subject
92
- </pre class="ruby">
93
-
94
- <h4>
95
- To get the body of the email:
96
- </h4>
97
-
98
- <pre class="ruby">
99
- p mail.body
100
- </pre>
101
-
102
- <p>
103
- For more information, see the RDoc index and the TMail::Mail class specifically.
104
- </p>
105
-
106
- <h3>MIME multipart emails</h3>
107
-
108
- <p>
109
- TMail also supports MIME multipart mails.
110
- <br />
111
- <br />
112
- If mail is multipart mail, Mail#multipart? returns true,
113
- and Mail#parts contains an array of parts (TMail::Mail object).
114
- </p>
115
-
116
- <pre class="ruby">
117
- require 'tmail'
118
-
119
- mail = TMail::Mail.parse( multipart_mail_string )
120
- if mail.multipart? then
121
- mail.parts.each do |m|
122
- puts m.main_type
123
- end
124
- end
125
- </pre>
126
-
127
- <h2>Creating New Mail</h2>
128
-
129
- <p>Creating an email is just as easy:</p>
130
-
131
- <pre class="ruby">
132
- require 'tmail'
133
-
134
- # Example 1: create mail only in memory
135
- mail = TMail::Mail.new
136
-
137
- # Example 2: create mail on mailbox (on disk)
138
- loader = TMail::MhLoader.new('/home/aamine/Mail/drafts')
139
- mail = TMail::Mail.new( loader.new_port )
140
- </pre>
141
-
142
- <p>
143
- Then fill headers and body.
144
- </p>
145
-
146
- <pre class="ruby">
147
- mail.to = 'test@loveruby.net'
148
- mail.from = 'Minero Aoki &lt;aamine@loveruby.net&gt;'
149
- mail.subject = 'test mail'
150
- mail.date = Time.now
151
- mail.mime_version = '1.0'
152
- mail.set_content_type 'text', 'plain', {'charset'=&gt;'iso-2022-jp'}
153
- mail.body = 'This is test mail.'
154
- </pre>
155
-
156
- <p>
157
- At last, convert mail object to string.
158
- </p>
159
-
160
- <pre class="ruby">
161
- str = mail.to_s
162
- </pre>
163
-
164
- <p>
165
- If you want to write mails against files directly
166
- (without intermediate string), use Mail#write_back.
167
- </p>
168
-
169
- <pre class="ruby">
170
- mail.write_back
171
- </pre>
172
-
173
-
174
- <h3>What TMail is NOT</h3>
175
-
176
- <p>
177
- Right now, TMail does not touch the body of the mail message,
178
- for example, it doesn't encode, decode, handle character sets
179
- etc. It only handles the message and headers and gives you
180
- access to read and write the mail body.
181
- </p>
182
-
183
- <p>
184
- Plans for future versions are to allow better handling of the mail
185
- body, auto decode Base64 and handling attachments in a better way.
186
- </p>
187
-
188
- <h2>Now what?</h2>
189
-
190
- <p>Go to the <a href="../manual/index.html">online manual</a> to find out
191
- how to use it all, or if you are stuck you can join the
192
- <a href="http://rubyforge.org/mailman/listinfo/tmail-talk">TMail-Talk</a>
193
- mailing list and ask your question there.</p>
@@ -1,247 +0,0 @@
1
- <h1>Address Classes</h1>
2
-
3
- <h2><code>class <a name="TMail%3a%3aAddress">TMail::Address</a> </code></h2>
4
-
5
- <h3>Class Methods</h3>
6
-
7
- <dl>
8
- <dt><a name="TMail%3a%3aAddress-parse"><code>parse(str)</code></a> -&gt; <code><a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a></code></dt>
9
- <dd>
10
- <p>
11
- str: String<br>
12
- </p>
13
-
14
- <p>
15
- parses the string and creates a new <code>TMail::Address</code> object.
16
- If the string does not follow the standard internet address format, a
17
- <code>TMail::SyntaxError</code> exception is raised.
18
- </p>
19
-
20
- </dd>
21
- <dt><a name="TMail%3a%3aAddress-new"><code>new(locals, <var>domains</var>)</code></a> -&gt; <code><a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a></code></dt>
22
- <dd>
23
- <p>
24
- locals: [String]<br>
25
- domains: [String]<br>
26
- </p>
27
-
28
- <p>
29
- creates a new <code>TMail::Address</code> object consisting of the local part,
30
- LOCALS and domain part <var>domains</var>.
31
- </p>
32
-
33
- </dd>
34
- </dl>
35
- <h3>Instance Methods</h3>
36
-
37
- <dl>
38
- <dt><a name="TMail%3a%3aAddress-address_group%3f"><code>address_group?</code></a> -&gt; <code>true | false</code></dt>
39
- <dd>
40
- <p>
41
- returns false.
42
- </p>
43
-
44
- </dd>
45
- <dt><a name="TMail%3a%3aAddress-spec"><code>spec</code></a> -&gt; <code>String</code></dt>
46
- <dd>
47
- <p>
48
- an address spec ("....@....").
49
- </p>
50
-
51
- </dd>
52
- <dt><a name="TMail%3a%3aAddress-routes"><code>routes</code></a> -&gt; <code>[String]</code></dt>
53
- <dd>
54
- <p>
55
- delivery routes. Strings do not include character "@".
56
- </p>
57
-
58
- </dd>
59
- <dt><a name="TMail%3a%3aAddress-name"><code>name</code></a> -&gt; <code>String</code></dt>
60
- <dt><a name="TMail%3a%3aAddress-phrase"><code>phrase</code></a> -&gt; <code>String</code></dt>
61
- <dd>
62
- <p>
63
- short description for this address (e.g. real name).
64
- </p>
65
-
66
- </dd>
67
- <dt><a name="TMail%3a%3aAddress-encoded"><code>encoded(eol = "\r\n", <var>encoding</var> = 'j')</code></a> -&gt; <code>String</code></dt>
68
- <dd>
69
- <p>
70
- eol: String<br>
71
- encoding: String<br>
72
- </p>
73
-
74
- <p>
75
- converts this object into MIME-encoded string.
76
- </p>
77
-
78
- </dd>
79
- <dt><a name="TMail%3a%3aAddress-to_s"><code>to_s(eol = "\n", <var>encoding</var> = 'e')</code></a> -&gt; <code>String</code></dt>
80
- <dt><a name="TMail%3a%3aAddress-decoded"><code>decoded(eol = "\n", <var>encoding</var> = 'e')</code></a> -&gt; <code>String</code></dt>
81
- <dd>
82
- <p>
83
- eol: String<br>
84
- encoding: String<br>
85
- </p>
86
-
87
- <p>
88
- converts this object into decoded string.
89
- </p>
90
-
91
- </dd>
92
- <dt><a name="TMail%3a%3aAddress-%3d%3d"><code>==(other)</code></a> -&gt; <code>true | false</code></dt>
93
- <dd>
94
- <p>
95
- other: Object<br>
96
- </p>
97
-
98
- <p>
99
- judge if self equals to other by inspecting addr-spec string (#spec).
100
- #name and #routes never affects the return value.
101
- </p>
102
-
103
-
104
- </dd>
105
- </dl>
106
- <h2><code>class <a name="TMail%3a%3aAddressGroup">TMail::AddressGroup</a> </code></h2>
107
-
108
- <h3>Class Methods</h3>
109
-
110
- <dl>
111
- <dt><a name="TMail%3a%3aAddressGroup-new"><code>new(name, <var>addrs</var>)</code></a> -&gt; <code><a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a></code></dt>
112
- <dd>
113
- <p>
114
- name: String<br>
115
- addrs: [<a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a>]<br>
116
- </p>
117
-
118
- <p>
119
- creates new <code>TMail::AddressGroup</code> object.
120
- NAME is the name of this group, <var>addrs</var> is addresses
121
- which belongs to this group.
122
- </p>
123
-
124
- </dd>
125
- </dl>
126
- <h3>Instance Methods</h3>
127
-
128
- <dl>
129
- <dt><a name="TMail%3a%3aAddressGroup-address_group%3f"><code>address_group?</code></a> -&gt; <code>true | false</code></dt>
130
- <dd>
131
- <p>
132
- returns true.
133
- </p>
134
-
135
- </dd>
136
- <dt><a name="TMail%3a%3aAddressGroup-name"><code>name</code></a> -&gt; <code>String</code></dt>
137
- <dd>
138
- <p>
139
- the human readable name of this group.
140
- </p>
141
-
142
- </dd>
143
- <dt><a name="TMail%3a%3aAddressGroup-addresses"><code>addresses</code></a> -&gt; <code>[<a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a>]</code></dt>
144
- <dd>
145
- <p>
146
- addresses which belongs to this group.
147
- </p>
148
-
149
- </dd>
150
- <dt><a name="TMail%3a%3aAddressGroup-to_a"><code>to_a</code></a> -&gt; <code>[<a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a>]</code></dt>
151
- <dt><a name="TMail%3a%3aAddressGroup-to_ary"><code>to_ary</code></a> -&gt; <code>[<a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a>]</code></dt>
152
- <dd>
153
- <p>
154
- equals to <code>addresses.dup</code>.
155
- </p>
156
-
157
- </dd>
158
- <dt><a name="TMail%3a%3aAddressGroup-flatten"><code>flatten</code></a> -&gt; <code>[<a href="address.html#TMail%3a%3aAddress">TMail::Address</a>]</code></dt>
159
- <dd>
160
- <p>
161
- flatten this group into one level of array of <code>TMail::Address</code>.
162
- </p>
163
-
164
- </dd>
165
- <dt><a name="TMail%3a%3aAddressGroup-add"><code>add(addr)</code></a></dt>
166
- <dt><a name="TMail%3a%3aAddressGroup-push"><code>push(addr)</code></a></dt>
167
- <dd>
168
- <p>
169
- addr: <a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a><br>
170
- </p>
171
-
172
- <p>
173
- adds an address or an address group to this group.
174
- </p>
175
-
176
- </dd>
177
- <dt><a name="TMail%3a%3aAddressGroup-delete"><code>delete(addr)</code></a></dt>
178
- <dd>
179
- <p>
180
- addr: <a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a><br>
181
- </p>
182
-
183
- <p>
184
- removes ADDR from this group.
185
- </p>
186
-
187
- </dd>
188
- <dt><a name="TMail%3a%3aAddressGroup-each%20%7b%7ca%7c%20%2e%2e%2e%2e%20%7d"><code>each {|a| .... }</code></a></dt>
189
- <dd>
190
- <p>
191
- a: <a href="address.html#TMail%3a%3aAddress">TMail::Address</a> | <a href="address.html#TMail%3a%3aAddressGroup">TMail::AddressGroup</a><br>
192
- </p>
193
-
194
- <p>
195
- equals to <code>addresses.each {|a| .... }</code>.
196
- </p>
197
-
198
- </dd>
199
- <dt><a name="TMail%3a%3aAddressGroup-each_address%20%7b%7ca%7c%20%2e%2e%2e%2e%20%7d"><code>each_address {|a| .... }</code></a></dt>
200
- <dd>
201
- <p>
202
- a: <a href="address.html#TMail%3a%3aAddress">TMail::Address</a><br>
203
- </p>
204
-
205
- <p>
206
- equals to <code>flatten.each {|a| .... }</code>
207
- </p>
208
-
209
- </dd>
210
- <dt><a name="TMail%3a%3aAddressGroup-encoded"><code>encoded(eol = "\r\n", <var>encoding</var> = 'j')</code></a> -&gt; <code>String</code></dt>
211
- <dd>
212
- <p>
213
- eol: String<br>
214
- encoding: String<br>
215
- </p>
216
-
217
- <p>
218
- converts this object into MIME-encoded string.
219
- </p>
220
-
221
- </dd>
222
- <dt><a name="TMail%3a%3aAddressGroup-decoded"><code>decoded(eol = "\n", <var>encoding</var> = 'e')</code></a> -&gt; <code>String</code></dt>
223
- <dd>
224
- <p>
225
- eol: String<br>
226
- encoding: String<br>
227
- </p>
228
-
229
- <p>
230
- converts this object into decoded string.
231
- </p>
232
-
233
- </dd>
234
- <dt><a name="TMail%3a%3aAddressGroup-%3d%3d"><code>==(other)</code></a> -&gt; <code>true | false</code></dt>
235
- <dt><a name="TMail%3a%3aAddressGroup-eql%3f"><code>eql?(other)</code></a> -&gt; <code>true | false</code></dt>
236
- <dd>
237
- <p>
238
- other: Object<br>
239
- </p>
240
-
241
- <p>
242
- judges if self is equal to OTHER, by comparing <code>self.addresses</code> and
243
- <code>other.addresses</code>. (<code>self.name</code> is meanless)
244
- </p>
245
- </dd>
246
- </dl>
247
-