tmail 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/CHANGES +50 -5
  2. data/MANIFEST +188 -0
  3. data/NOTES +1 -1
  4. data/README +10 -4
  5. data/Rakefile +1 -10
  6. data/lib/tmail.rb +1 -0
  7. data/lib/tmail/Makefile +0 -1
  8. data/lib/tmail/address.rb +190 -17
  9. data/lib/tmail/attachments.rb +1 -1
  10. data/lib/tmail/base64.rb +4 -10
  11. data/lib/tmail/compat.rb +8 -6
  12. data/lib/tmail/config.rb +2 -6
  13. data/lib/tmail/core_extensions.rb +14 -18
  14. data/lib/tmail/encode.rb +47 -12
  15. data/lib/tmail/header.rb +7 -10
  16. data/lib/tmail/index.rb +2 -1
  17. data/lib/tmail/interface.rb +14 -12
  18. data/lib/tmail/loader.rb +2 -0
  19. data/lib/tmail/mail.rb +83 -24
  20. data/lib/tmail/mailbox.rb +70 -10
  21. data/lib/tmail/main.rb +2 -0
  22. data/lib/tmail/mbox.rb +2 -0
  23. data/lib/tmail/net.rb +16 -15
  24. data/lib/tmail/obsolete.rb +7 -12
  25. data/lib/tmail/parser.rb +1 -0
  26. data/lib/tmail/require_arch.rb +2 -0
  27. data/lib/tmail/scanner.rb +2 -1
  28. data/lib/tmail/scanner_r.rb +11 -10
  29. data/lib/tmail/utils.rb +83 -26
  30. data/lib/tmail/version.rb +3 -2
  31. data/log/BugTrackingLog.txt +1208 -0
  32. data/log/{ChangeLog.txt → Changelog-0.txt} +36 -0
  33. data/log/Changelog.txt +534 -0
  34. data/log/Testlog.txt +114 -0
  35. data/log/Todo.txt +0 -2
  36. data/meta/VERSION +1 -0
  37. data/meta/project.yaml +8 -5
  38. data/meta/unixname +1 -0
  39. data/setup.rb +1481 -0
  40. data/site/contributing/index.html +183 -0
  41. data/site/css/clean.css +27 -0
  42. data/site/css/layout.css +31 -0
  43. data/site/css/style.css +60 -0
  44. data/site/download/index.html +61 -0
  45. data/site/img/envelope.jpg +0 -0
  46. data/site/img/mailman.gif +0 -0
  47. data/site/img/stamp-sm.jpg +0 -0
  48. data/site/img/stamp.jpg +0 -0
  49. data/site/img/stampborder.jpg +0 -0
  50. data/site/img/tfire.jpg +0 -0
  51. data/site/img/tmail.png +0 -0
  52. data/site/index.html +270 -0
  53. data/site/js/jquery.js +31 -0
  54. data/site/log/Changelog.xsl +33 -0
  55. data/site/log/changelog.xml +1677 -0
  56. data/site/outdated/BUGS +3 -0
  57. data/site/outdated/DEPENDS +1 -0
  58. data/site/outdated/Incompatibilities +89 -0
  59. data/site/outdated/Incompatibilities.ja +102 -0
  60. data/site/outdated/NEWS +9 -0
  61. data/site/outdated/README.ja +73 -0
  62. data/site/outdated/doc.ja/address.html +275 -0
  63. data/site/outdated/doc.ja/basics.html +405 -0
  64. data/site/outdated/doc.ja/config.html +49 -0
  65. data/site/outdated/doc.ja/details.html +146 -0
  66. data/site/outdated/doc.ja/index.html +39 -0
  67. data/site/outdated/doc.ja/mail.html +793 -0
  68. data/site/outdated/doc.ja/mailbox.html +265 -0
  69. data/site/outdated/doc.ja/port.html +95 -0
  70. data/site/outdated/doc.ja/tmail.html +58 -0
  71. data/site/outdated/doc.ja/usage.html +202 -0
  72. data/site/outdated/rdd/address.rrd.m +229 -0
  73. data/site/outdated/rdd/basics.rd.m +275 -0
  74. data/site/outdated/rdd/config.rrd.m +26 -0
  75. data/site/outdated/rdd/details.rd.m +117 -0
  76. data/site/outdated/rdd/index.rhtml.m +54 -0
  77. data/site/outdated/rdd/mail.rrd.m +701 -0
  78. data/site/outdated/rdd/mailbox.rrd.m +228 -0
  79. data/site/outdated/rdd/port.rrd.m +69 -0
  80. data/site/outdated/rdd/tmail.rrd.m +33 -0
  81. data/site/outdated/rdd/usage.rd.m +247 -0
  82. data/site/quickstart/index.html +69 -0
  83. data/site/quickstart/quickstart.html +52 -0
  84. data/site/quickstart/usage.html +193 -0
  85. data/site/reference/address.html +247 -0
  86. data/site/reference/config.html +30 -0
  87. data/site/reference/index.html +101 -0
  88. data/site/reference/mail.html +726 -0
  89. data/site/reference/mailbox.html +245 -0
  90. data/site/reference/port.html +75 -0
  91. data/site/reference/tmail.html +35 -0
  92. data/test/fixtures/mailbox +405 -4
  93. data/test/fixtures/raw_email_multiple_from +30 -0
  94. data/test/kcode.rb +2 -2
  95. data/test/temp_test_one.rb +46 -0
  96. data/test/test_address.rb +77 -38
  97. data/test/test_encode.rb +0 -2
  98. data/test/test_header.rb +47 -24
  99. data/test/test_mail.rb +52 -9
  100. data/test/test_mbox.rb +28 -0
  101. data/test/test_port.rb +33 -27
  102. data/test/test_quote.rb +35 -8
  103. data/work/script/make +26 -0
  104. data/work/script/rdoc +39 -0
  105. data/{script → work/script}/setup +0 -0
  106. data/work/script/test +30 -0
  107. metadata +249 -184
  108. data/log/History.txt +0 -40
  109. data/meta/config.yaml +0 -8
  110. data/meta/icli.yaml +0 -16
  111. data/meta/tmail.roll +0 -3
  112. data/script/changelog +0 -19
  113. data/script/clobber/distclean +0 -8
  114. data/script/clobber/package +0 -10
  115. data/script/compile +0 -32
  116. data/script/pack/gem +0 -93
  117. data/script/pack/tgz +0 -41
  118. data/script/pack/zip +0 -41
  119. data/script/prepare +0 -15
  120. data/script/publish +0 -51
  121. data/script/rdoc +0 -42
  122. data/script/release +0 -10
  123. data/script/stamp +0 -33
  124. data/script/stats +0 -138
  125. data/script/tag +0 -25
  126. data/script/test +0 -36
@@ -0,0 +1,265 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html lang="ja-JP">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
5
+ <meta http-equiv="Content-Language" content="ja-JP">
6
+ <title><code>Mailbox Classes</code></title>
7
+ </head>
8
+ <body>
9
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
10
+ </script>
11
+ <script type="text/javascript">
12
+ _uacct = "UA-2871747-1";
13
+ urchinTracker();
14
+ </script>
15
+
16
+
17
+ <h1><code>Mailbox Classes</code></h1>
18
+
19
+ <h2><code>class <a name="TMail%3a%3aMhMailbox">TMail::MhMailbox</a> </code></h2>
20
+
21
+ <p>
22
+ MH $B7A<0$N%a!<%k%\%C%/%9$r1#JC$9$k%/%i%9!#(B
23
+ </p>
24
+
25
+ <h3>$B%/%i%9%a%=%C%I(B</h3>
26
+
27
+ <dl>
28
+ <dt><a name="TMail%3a%3aMhMailbox-new"><code>new(dirname)</code></a> $B"*(B <code><a href="mailbox.html#TMail%3a%3aMhMailbox">TMail::MhMailbox</a></code></dt>
29
+ <dd>
30
+ <p>
31
+ dirname: String<br>
32
+ </p>
33
+
34
+ <p>
35
+ <code>MhMailbox</code> $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B
36
+ <code>dirname</code> $B$O(B MH $B%a!<%k%\%C%/%9$H$7$F;H$&%G%#%l%/%H%jL>$G$9!#(B
37
+ $B$9$G$K:n@.$:$_$G$J$1$l$P$$$1$^$;$s!#(B
38
+ </p>
39
+
40
+ </dd>
41
+ </dl>
42
+ <h3>$B%$%s%9%?%s%9%a%=%C%I(B</h3>
43
+
44
+ <dl>
45
+ <dt><a name="TMail%3a%3aMhMailbox-each_port%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>each_port {|port| .... }</code></a></dt>
46
+ <dt><a name="TMail%3a%3aMhMailbox-each%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>each {|port| .... }</code></a></dt>
47
+ <dd>
48
+ <p>
49
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
50
+ </p>
51
+
52
+ <p>
53
+ $B%a!<%k%\%C%/%9$N%a!<%k$KBP$7$F8E$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B
54
+ </p>
55
+
56
+ </dd>
57
+ <dt><a name="TMail%3a%3aMhMailbox-reverse_each_port%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>reverse_each_port {|port| .... }</code></a></dt>
58
+ <dt><a name="TMail%3a%3aMhMailbox-reverse_each%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>reverse_each {|port| .... }</code></a></dt>
59
+ <dd>
60
+ <p>
61
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
62
+ </p>
63
+
64
+ <p>
65
+ $B%G%#%l%/%H%jCf$N%a!<%k$KBP$7$F?7$7$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B
66
+ </p>
67
+
68
+ </dd>
69
+ <dt><a name="TMail%3a%3aMhMailbox-last_atime"><code>last_atime</code></a> $B"*(B <code>Time</code></dt>
70
+ <dt><a name="TMail%3a%3aMhMailbox-last_atime%3d"><code>last_atime=(time)</code></a></dt>
71
+ <dd>
72
+ <p>
73
+ time: Time<br>
74
+ </p>
75
+
76
+ <p>
77
+ $B:G8e$K(B <code>each_new_port/each_port/reverse_each_port</code> $B$r8F$S=P$7$?;~4V!#(B
78
+ </p>
79
+
80
+ </dd>
81
+ <dt><a name="TMail%3a%3aMhMailbox-each_new_port"><code>each_new_port(time = last_atime()) {|port| .... }</code></a></dt>
82
+ <dd>
83
+ <p>
84
+ time: Time<br>
85
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
86
+ </p>
87
+
88
+ <p>
89
+ $B?7Ce%a!<%k$N$_$KBP$7$F$/$j$+$($7$^$9!#(B
90
+ $B0z?t(B <code>time</code> $B$,M?$($i$l$?$H$-$O$=$N;~9o0J9_$K99?7$5$l$?%a!<%k$r?7Ce$H$_$J$7$^$9!#(B
91
+ $BM?$($i$l$J$+$C$?;~$OA02s$N(B <code>each_mail, reverse_each_mail, each_new_port</code> $B$N8e$K(B
92
+ $B99?7$5$l$?%a!<%k$r?7Ce$H$_$J$7$^$9!#(B
93
+ </p>
94
+
95
+ </dd>
96
+ <dt><a name="TMail%3a%3aMhMailbox-new_port"><code>new_port</code></a> $B"*(B <code><a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a></code></dt>
97
+ <dd>
98
+ <p>
99
+ $B?7$7$$%a!<%k$KBP1~$9$k%U%!%$%k$r:n@.$7!"(B
100
+ $BBP1~$9$k(B <code>TMail::Port</code> $B%*%V%8%'%/%H$rJV$9!#(B
101
+ </p>
102
+
103
+ </dd>
104
+ <dt><a name="TMail%3a%3aMhMailbox-close"><code>close</code></a></dt>
105
+ <dd>
106
+ <p>
107
+ $B$J$K$b$7$^$;$s!#(B
108
+ </p>
109
+
110
+ </dd>
111
+ </dl>
112
+ <h2><code>class <a name="TMail%3a%3aUNIXMbox">TMail::UNIXMbox</a> </code></h2>
113
+
114
+ <p>
115
+ <code>UNIX mbox</code> $B$r07$&%/%i%9!#8=:_$N<BAu$G$O!"@8@.;~$K(B MH $B7A<0$KJQ49$7!"(B
116
+ $BL@<(E*$J(B <code>close</code> $B8F$S=P$7$+(B GC $B$N%?%$%_%s%0$G%U%!%$%k$K=q$-La$7$^$9!#(B
117
+ </p>
118
+
119
+ <h3>$B%/%i%9%a%=%C%I(B</h3>
120
+
121
+ <dl>
122
+ <dt><a name="TMail%3a%3aUNIXMbox-new"><code>new(filename)</code></a> $B"*(B <code><a href="mailbox.html#TMail%3a%3aUNIXMbox">TMail::UNIXMbox</a></code></dt>
123
+ <dd>
124
+ <p>
125
+ filename: String<br>
126
+ </p>
127
+
128
+ <p>
129
+ $B?7$7$$(B <code>TMail::UNIXMbox</code> $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B
130
+ <code>filename</code> $B$O(B <code>UNIX mbox</code> $B%U%!%$%kL>$G$9!#(B
131
+ </p>
132
+
133
+ </dd>
134
+ </dl>
135
+ <h3>$B%$%s%9%?%s%9%a%=%C%I(B</h3>
136
+
137
+ <dl>
138
+ <dt><a name="TMail%3a%3aUNIXMbox-each_port%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>each_port {|port| .... }</code></a></dt>
139
+ <dt><a name="TMail%3a%3aUNIXMbox-each%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>each {|port| .... }</code></a></dt>
140
+ <dd>
141
+ <p>
142
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
143
+ </p>
144
+
145
+ <p>
146
+ $B%a!<%k%\%C%/%9$N%a!<%k$KBP$7$F8E$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B
147
+ </p>
148
+
149
+ </dd>
150
+ <dt><a name="TMail%3a%3aUNIXMbox-reverse_each_port%20%7b%7cport%7c%20%2e%2e%2e%20%7d"><code>reverse_each_port {|port| ... }</code></a></dt>
151
+ <dt><a name="TMail%3a%3aUNIXMbox-reverse_each%20%7b%7cport%7c%20%2e%2e%2e%20%7d"><code>reverse_each {|port| ... }</code></a></dt>
152
+ <dd>
153
+ <p>
154
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
155
+ </p>
156
+
157
+ <p>
158
+ $B%G%#%l%/%H%jCf$N%a!<%k$KBP$7$F?7$7$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B
159
+ </p>
160
+
161
+ </dd>
162
+ <dt><a name="TMail%3a%3aUNIXMbox-each_new_port"><code>each_new_port(time = @last_loaded_time) {|port| .... }</code></a></dt>
163
+ <dd>
164
+ <p>
165
+ time: Time<br>
166
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
167
+ </p>
168
+
169
+ <p>
170
+ $B?7Ce%a!<%k$N$_$KBP$7$F$/$j$+$($7$^$9!#(B
171
+ $B0z?t(B <code>time</code> $B$,M?$($i$l$?$H$-$O$=$N;~9o0J9_$K99?7$5$l$?%a!<%k$r?7Ce$H$_$J$7$^$9!#(B
172
+ $BM?$($i$l$J$+$C$?;~$OA02s$N(B <code>each_mail, reverse_each_mail, each_new_port</code> $B$N8e$K(B
173
+ $B99?7$5$l$?%a!<%k$r?7Ce$H$_$J$7$^$9!#(B
174
+ </p>
175
+
176
+ </dd>
177
+ <dt><a name="TMail%3a%3aUNIXMbox-new_port"><code>new_port</code></a> $B"*(B <code><a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a></code></dt>
178
+ <dd>
179
+ <p>
180
+ $B?7$7$$%a!<%k$KBP1~$9$k%U%!%$%k$r:n@.$7!"(B
181
+ $BBP1~$9$k(B <code>TMail::Port</code> $B%*%V%8%'%/%H$rJV$9!#(B
182
+ </p>
183
+
184
+ </dd>
185
+ <dt><a name="TMail%3a%3aUNIXMbox-close"><code>close</code></a></dt>
186
+ <dd>
187
+ <p>
188
+ $BL@<(E*$K%a!<%k%\%C%/%9$r=q$-La$7$^$9!#0J8e!"$3$N%*%V%8%'%/%H$K(B
189
+ $BBP$7$F%a!<%kA`:n%a%=%C%I$r8F$S=P$9$HA4$FNc30$K$J$j$^$9!#(B
190
+ </p>
191
+
192
+ </dd>
193
+ </dl>
194
+ <h2><code>class <a name="TMail%3a%3aMaildir">TMail::Maildir</a> </code></h2>
195
+
196
+ <p>
197
+ <code>qmail</code> $B$,;HMQ$9$k%a!<%k%\%C%/%9(B <code>maildir</code> $B$r1#JC$9$k%/%i%9!#(B
198
+ </p>
199
+
200
+ <h3>$B%/%i%9%a%=%C%I(B</h3>
201
+
202
+ <dl>
203
+ <dt><a name="TMail%3a%3aMaildir-new"><code>new(dirname)</code></a> $B"*(B <code><a href="mailbox.html#TMail%3a%3aMaildir">TMail::Maildir</a></code></dt>
204
+ <dd>
205
+ <p>
206
+ dirname: String<br>
207
+ </p>
208
+
209
+ <p>
210
+ $B?7$7$$(B <code>TMail::Maildir</code> $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B
211
+ <code>dirname</code> $B$O(B <code>maildir</code> $B%a!<%k%\%C%/%9$H$7$F;H$&%G%#%l%/%H%jL>$G$9!#(B
212
+ $B%G%#%l%/%H%j$O$9$G$K:n@.$:$_$G$J$1$l$P$$$1$^$;$s!#(B
213
+ </p>
214
+
215
+ </dd>
216
+ </dl>
217
+ <h3>$B%$%s%9%?%s%9%a%=%C%I(B</h3>
218
+
219
+ <dl>
220
+ <dt><a name="TMail%3a%3aMaildir-each_port%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>each_port {|port| .... }</code></a></dt>
221
+ <dt><a name="TMail%3a%3aMaildir-each%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>each {|port| .... }</code></a></dt>
222
+ <dd>
223
+ <p>
224
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
225
+ </p>
226
+
227
+ <p>
228
+ $B%a!<%k%\%C%/%9$N%a!<%k$KBP$7$F8E$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B
229
+ </p>
230
+
231
+ </dd>
232
+ <dt><a name="TMail%3a%3aMaildir-reverse_each_port%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>reverse_each_port {|port| .... }</code></a></dt>
233
+ <dt><a name="TMail%3a%3aMaildir-reverse_each%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>reverse_each {|port| .... }</code></a></dt>
234
+ <dd>
235
+ <p>
236
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
237
+ </p>
238
+
239
+ <p>
240
+ $B%G%#%l%/%H%jCf$N%a!<%k$KBP$7$F?7$7$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B
241
+ </p>
242
+
243
+ </dd>
244
+ <dt><a name="TMail%3a%3aMaildir-each_new_port%20%7b%7cport%7c%20%2e%2e%2e%2e%20%7d"><code>each_new_port {|port| .... }</code></a></dt>
245
+ <dd>
246
+ <p>
247
+ port: <a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a><br>
248
+ </p>
249
+
250
+ <p>
251
+ <code>MAILDIR/new</code> $B$N%a!<%k$KBP$7$F!"(B<code>cur</code> $B$K0\F0$7$?$N$A$K7+$jJV$7$^$9!#(B
252
+ </p>
253
+
254
+ </dd>
255
+ <dt><a name="TMail%3a%3aMaildir-new_port"><code>new_port</code></a> $B"*(B <code><a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a></code></dt>
256
+ <dd>
257
+ <p>
258
+ $B?7$7$$%a!<%k$KBP1~$9$k%U%!%$%k$r:n@.$7!"(B
259
+ $BBP1~$9$k(B <code>Port</code> $B%*%V%8%'%/%H$rJV$9!#(B
260
+ </p>
261
+ </dd>
262
+ </dl>
263
+
264
+ </body>
265
+ </html>
@@ -0,0 +1,95 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html lang="ja-JP">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
5
+ <meta http-equiv="Content-Language" content="ja-JP">
6
+ <title><code>Port Classes</code></title>
7
+ </head>
8
+ <body>
9
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
10
+ </script>
11
+ <script type="text/javascript">
12
+ _uacct = "UA-2871747-1";
13
+ urchinTracker();
14
+ </script>
15
+
16
+
17
+ <h1><code>Port Classes</code></h1>
18
+
19
+ <h2><code>class <a name="TMail%3a%3aPort">TMail::Port</a> </code></h2>
20
+
21
+ <p>
22
+ <code>TMail::Port</code> $B$O(B <code>TMail</code> $B%i%$%V%i%j$G$N%U%!%$%k$dJ8;zNs$NCj>]I=8=$G$9!#(B
23
+ $B%a!<%k0lDLJ,$K$"$?$k%j%=!<%9$r1#JC$7$^$9!#(B
24
+ </p>
25
+
26
+ <h3>$B%$%s%9%?%s%9%a%=%C%I(B</h3>
27
+
28
+ <dl>
29
+ <dt><a name="TMail%3a%3aPort-ropen"><code>ropen</code></a> $B"*(B <code>IO</code></dt>
30
+ <dd>
31
+ <p>
32
+ $BFI$_$3$_MQ%9%H%j!<%`$rJV$7$^$9!#(B
33
+ </p>
34
+
35
+ </dd>
36
+ <dt><a name="TMail%3a%3aPort-wopen"><code>wopen</code></a> $B"*(B <code>IO</code></dt>
37
+ <dd>
38
+ <p>
39
+ $B=q$-$3$_MQ%9%H%j!<%`$rJV$7$^$9!#(B
40
+ </p>
41
+
42
+ </dd>
43
+ <dt><a name="TMail%3a%3aPort-aopen"><code>aopen</code></a> $B"*(B <code>IO</code></dt>
44
+ <dd>
45
+ <p>
46
+ $BDI2C=q$-$3$_MQ%9%H%j!<%`$rJV$7$^$9!#(B
47
+ </p>
48
+
49
+ </dd>
50
+ </dl>
51
+ <h2><code>class <a name="TMail%3a%3aFilePort">TMail::FilePort</a> &lt; TMail::Port</code></h2>
52
+
53
+ <h3>$B%/%i%9%a%=%C%I(B</h3>
54
+
55
+ <dl>
56
+ <dt><a name="TMail%3a%3aFilePort-new"><code>new(filename)</code></a> $B"*(B <code><a href="port.html#TMail%3a%3aFilePort">TMail::FilePort</a></code></dt>
57
+ <dd>
58
+ <p>
59
+ filename: String<br>
60
+ </p>
61
+
62
+ <p>
63
+ <code>FilePort</code> $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B
64
+ <code>filename</code> $B$O%a!<%k0lDL$r$*$5$a$?%U%!%$%kL>$G$J$1$l$P$$$1$^$;$s!#(B
65
+ </p>
66
+
67
+ </dd>
68
+ <dt><a name="TMail%3a%3aFilePort-filename"><code>filename</code></a> $B"*(B <code>String</code></dt>
69
+ <dd>
70
+ <p>
71
+ $B$3$N%]!<%H$,1#JC$7$F$$$k%U%!%$%kL>$rJV$7$^$9!#(B
72
+ </p>
73
+
74
+ </dd>
75
+ </dl>
76
+ <h2><code>class <a name="TMail%3a%3aStringPort">TMail::StringPort</a> &lt; TMail::Port</code></h2>
77
+
78
+ <h3>$B%/%i%9%a%=%C%I(B</h3>
79
+
80
+ <dl>
81
+ <dt><a name="TMail%3a%3aStringPort-new"><code>new(src = '')</code></a> $B"*(B <code><a href="port.html#TMail%3a%3aStringPort">TMail::StringPort</a></code></dt>
82
+ <dd>
83
+ <p>
84
+ src: String<br>
85
+ </p>
86
+
87
+ <p>
88
+ <code>StringPort</code> $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B
89
+ <code>string</code> $B$O%a!<%k0lDLJ,$NJ8;zNs$G$J$1$l$P$$$1$^$;$s!#(B
90
+ </p>
91
+ </dd>
92
+ </dl>
93
+
94
+ </body>
95
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html lang="ja-JP">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
5
+ <meta http-equiv="Content-Language" content="ja-JP">
6
+ <title><code>module <a name="TMail">TMail</a> </code></title>
7
+ </head>
8
+ <body>
9
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
10
+ </script>
11
+ <script type="text/javascript">
12
+ _uacct = "UA-2871747-1";
13
+ urchinTracker();
14
+ </script>
15
+
16
+
17
+ <h1><code>module <a name="TMail">TMail</a> </code></h1>
18
+
19
+ <h2>$B%b%8%e!<%k4X?t(B</h2>
20
+
21
+ <dl>
22
+ <dt><a name="TMail-new_boundary"><code>new_boundary</code></a> $B"*(B <code>String</code></dt>
23
+ <dd>
24
+ <p>
25
+ $B?7$7$$%P%&%s%@%j$r:n@.$7$FJV$7$^$9!#(B
26
+ </p>
27
+
28
+ </dd>
29
+ <dt><a name="TMail-new_message_id"><code>new_message_id(fqdn = Socket.gethostname)</code></a> $B"*(B <code>String</code></dt>
30
+ <dd>
31
+ <p>
32
+ fqdn: String<br>
33
+ </p>
34
+
35
+ <p>
36
+ $B?7$7$$%a%C%;!<%8(B <code>ID</code> $B$r:n@.$7$FJV$7$^$9!#(B
37
+ $B0z?t(B <code>fqdn</code> $B$,>JN,$5$l$?>l9g$O%m!<%+%k%[%9%H$NL>A0$r;H$$$^$9!#(B
38
+ $B0lJ}(B <code>fqdn</code> $B$r;XDj$9$k>l9g$O%@%$%d%k%"%C%W$G$"$k$J$I$N;v>p$K$h$j(B
39
+ $B%[%9%H$NL>A0$rJQ$($kI,MW$,$"$k$N$@$H$_$J$7!"$=$l$K(B <code>'.tmail'</code> $B$r(B
40
+ $B$D$1$?%I%a%$%s$r;HMQ$7$^$9!#$3$l$O!VK\J*$N!W%I%a%$%s$G:n@.$5$l$k(B
41
+ $B%a%C%;!<%8(B <code>ID</code> $B$H$N=EJ#$rHr$1$k$?$a$G$9!#(B
42
+ </p>
43
+
44
+ </dd>
45
+ <dt><a name="TMail-message_id%3f"><code>message_id?(str)</code></a> $B"*(B <code>true | false</code></dt>
46
+ <dd>
47
+ <p>
48
+ str: String<br>
49
+ </p>
50
+
51
+ <p>
52
+ <code>str</code> $B$,%a%C%;!<%8(B <code>ID</code> $B$r4^$`$H$-??!#(B
53
+ </p>
54
+ </dd>
55
+ </dl>
56
+
57
+ </body>
58
+ </html>
@@ -0,0 +1,202 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html lang="ja-JP">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
5
+ <meta http-equiv="Content-Language" content="ja-JP">
6
+ <title>TMail $B$N;H$$J}(B</title>
7
+ </head>
8
+ <body>
9
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
10
+ </script>
11
+ <script type="text/javascript">
12
+ _uacct = "UA-2871747-1";
13
+ urchinTracker();
14
+ </script>
15
+
16
+
17
+ <h1>TMail $B$N;H$$J}(B</h1>
18
+
19
+ <h2>TMail $B$N35MW(B</h2>
20
+
21
+ <p>
22
+ <code>TMail</code> $B$OEE;R%a!<%k$r07$&$?$a$NAm9g%i%$%V%i%j$G$9!#%a!<%k$H%a!<%k(B
23
+ $B%\%C%/%9$N%O%s%I%j%s%0$r1#JC$7$^$9!#=i4|$NL\E*$,%a!<%i$N:n@.$@$C$?(B
24
+ $B$?$a!"<g$J;H$$J}$H$7$F$O!V%a!<%k$+$i>pJs$rF@$k!W!V?7$7$$%a!<%k$r:n@.$9$k!W(B
25
+ $B$NFs<oN`$,A[Dj$5$l$F$*$j!"%/%i%$%"%s%HB&$N=hM}$K6/$/$J$C$F$$$^$9!#(B
26
+ </p>
27
+
28
+ <h2>$B%a!<%k$+$i>pJs$rF@$k(B</h2>
29
+
30
+ <p>
31
+ $B$3$l$O0lHV:G=i$K<BAu$5$l$?ItJ,$G$"$j!"(B<code>TMail</code> $B$,:G$bF@0U$H$9$k=hM}$G$b(B
32
+ $B$"$j$^$9!#(B
33
+ </p>
34
+
35
+ <h3>TMail::Mail $B%/%i%9(B</h3>
36
+
37
+ <p>
38
+ <code>TMail::Mail</code> $B%/%i%9$O%a!<%k0lDL$r1#JC$9$k%*%V%8%'%/%H$G$9!#$^$:$I$&$K$+(B
39
+ $B$7$F$3$N%*%V%8%'%/%H$r:n$i$J$$$H$$$1$^$;$s!#$3$N%*%V%8%'%/%H$r:n$kJ}K!$O(B
40
+ $B;0DL$j$"$j$^$9!#(B
41
+ </p>
42
+
43
+ <ol>
44
+ <li>$BJ8;zNs$+$i$D$/$k(B</li>
45
+ <li>$B%U%!%$%k(B($BL>(B)$B$+$i$D$/$k(B</li>
46
+ <li><code>Port</code> $B$+$i$D$/$k(B</li>
47
+ </ol>
48
+
49
+ <p>
50
+ $BJ8;zNs!"%U%!%$%k$O$=$l$>$l%a!<%k0lDLJ,$@$1$r4^$s$G$$$J$1$l$P$$$1$^$;$s!#(B
51
+ $B$=$N$&$($G0J2<$N$h$&$K:n@.$7$^$9!#(B
52
+ </p>
53
+ <pre>
54
+ require 'tmail'
55
+ mail = TMail::Mail.parse(string) # from String
56
+ mail = TMail::Mail.load(filename) # from file
57
+ </pre>
58
+ <p>
59
+ $B$3$3$K$OFC$KLdBj$O$J$$$H;W$$$^$9!#(B
60
+ </p>
61
+
62
+ <h3>Port $B$H(B Loader</h3>
63
+
64
+ <p>
65
+ <code>Port</code> $B$H$$$&$N$O(B <code>TMail</code> $B$K$*$1$k%a!<%k%=!<%9$NCj>]I=8=$G$9!#$?$H$($P(B
66
+ $B>e=R$7$?J8;zNs$d%U%!%$%kL>$b%a!<%k%=!<%9$G!"(B<code>TMail::Mail#parse</code> $B$d(B <code>load</code> $B$O(B
67
+ $BJ8;zNs$d%U%!%$%k$r0lEY(B <code>Port</code> $B$G%i%C%W$7$?$&$($G(B <code>Mail</code> $B%*%V%8%'%/%H$r:n@.(B
68
+ $B$7$F$$$^$9!#$3$N(B <code>Port</code> $B$G%i%C%W$9$k$3$H$GJ8;zNs!"%U%!%$%k(B
69
+ ($B>-MhE*$K$O(B IMAP $B%W%m%H%3%k$b!)(B) $B$N0c$$$r1#JC$7$F$$$^$9!#(B
70
+ </p>
71
+
72
+ <p>
73
+ $B$?$@$7!"(B<code>Port</code> $B$r%f!<%6$,D>@\:n$k$3$H$O$"$^$j$J$$$G$7$g$&!#<g$K%f!<%6$,(B
74
+ <code>Port</code> $B$r$5$o$k$3$H$K$J$k$N$O!"%a!<%k%\%C%/%9$N%i%C%Q!<$G$"$k(B <code>Loader</code> $B$r(B
75
+ $B;H$&$H$-$G$9!#$?$H$($P(B MH $B%a!<%k%\%C%/%9$NCf$K$"$k%a!<%k$r=gHV$K=hM}$9$k(B
76
+ $B$?$a$K$O0J2<$N$h$&$K$7$^$9!#(B
77
+ </p>
78
+ <pre>
79
+ require 'tmail'
80
+
81
+ loader = TMail::MhLoader.new( '/home/aamine/Mail/inbox' )
82
+ loader.each_port do |port|
83
+ mail = TMail::Mail.new(port)
84
+ # ....
85
+ end
86
+ </pre>
87
+
88
+ <h3>TMail::Mail $B%*%V%8%'%/%H$+$i>pJs$rF@$k(B</h3>
89
+
90
+ <p>
91
+ $B0J>e$N$h$&$J<jCJ$G(B <code>TMail::Mail</code> $B%*%V%8%'%/%H$r:n$C$?$i!"$"$H$O$=$N%a%=%C%I$r(B
92
+ $B8F$V$@$1$G$?$$$F$$$N$3$H$O$G$-$^$9!#$?$H$($P(B <code>To:</code> $B%"%I%l%9$r<h$k$J$i(B
93
+ </p>
94
+ <pre>
95
+ require 'tmail'
96
+ mail = TMail::Mail.parse( 'To: Minero Aoki &lt;aamine@loveruby.net&gt;' )
97
+ p mail.to # =&gt; ["aamine@loveruby.net"]
98
+ </pre>
99
+ <p>
100
+ <code>Subject:</code> $B$J$i$P(B
101
+ </p>
102
+ <pre>
103
+ p mail.subject
104
+ </pre>
105
+ <p>
106
+ $B%a!<%kK\BN$J$i$P(B
107
+ $B$H$$$&$h$&$K!"$H$F$b4JC1$G$9!#(B
108
+ </p>
109
+
110
+ <p>
111
+ $B>\$7$/$O(B <code>TMail::Mail</code> $B%/%i%9$N%j%U%!%l%s%9$r!"(B
112
+ $B$h$j<BMQE*$JNc$H$7$F$O(B <code>sample/from-check.rb</code> $B$r8+$F$/$@$5$$!#(B
113
+ </p>
114
+
115
+ <h3>MIME $B%^%k%A%Q!<%H%a!<%k(B</h3>
116
+
117
+ <p>
118
+ MIME $B%^%k%A%Q!<%H%a!<%k$K$bBP1~$7$F$$$^$9!#%^%k%A%Q!<%H$N$H$-$O(B
119
+ <code>Mail#multipart?</code> $B$,??$K$J$j!"(B<code>#parts</code> $B$K(B <code>TMail::Mail</code> $B%*%V%8%'%/%H$N(B
120
+ $BG[Ns$,F~$j$^$9!#(B
121
+ </p>
122
+ <pre>
123
+ require 'tmail'
124
+ mail = TMail::Mail.parse( multipart_mail_string )
125
+ if mail.multipart? then
126
+ mail.parts.each do |m|
127
+ puts m.main_type
128
+ end
129
+ end
130
+ </pre>
131
+ <p>
132
+ $B$h$j6qBNE*$JNc$H$7$F$O(B <code>sample/multipart.rb</code> $B$r8+$F$/$@$5$$!#(B
133
+ </p>
134
+
135
+ <h3>TMail $B$,$d$i$J$$$3$H(B</h3>
136
+
137
+ <p>
138
+ <code>TMail</code> $B$O!"%X%C%@$O<+F0$G%G%3!<%I!&%(%s%3!<%I$7$^$9$,!"K\BN(B($BK\J8(B)$B$O(B
139
+ $B0l@ZJQ99$7$^$;$s!#$?$@$76a$$>-Mh$K$O(B <code>Base64</code> $B$N%G%3!<%I$O<+F0$G$d$k(B
140
+ $B$+$b$7$l$^$;$s!#(B
141
+ </p>
142
+
143
+
144
+ <h2>$B?7$7$$%a!<%k$r:n@.$9$k(B</h2>
145
+
146
+ <p>
147
+ $B$3$A$i$b(B <code>TMail::Mail</code> $B%/%i%9$,<gBN$G$9!#$H$K$+$/%a!<%k$r:n$l$P$$$$(B
148
+ $B>l9g$O6uJ8;zNs$+$i!"%a!<%k%\%C%/%9$K:n$j$?$$>l9g$O%m!<%@$r7PM3$7$F(B
149
+ $B%]!<%H$r:n@.$7$F$=$3$+$i!"%a!<%k%*%V%8%'%/%H$r:n$j$^$9!#(B
150
+ </p>
151
+ <pre>
152
+ require 'tmail'
153
+
154
+ # Example 1: create mail on only memory
155
+ mail = TMail::Mail.new
156
+
157
+ # Example 2: create mail on mailbox (on disk)
158
+ loader = TMail::MhLoader.new('/home/aamine/Mail/drafts')
159
+ mail = TMail::Mail.new( loader.new_port )
160
+ </pre>
161
+ <p>
162
+ $B:n$C$?$i!"Cf?H$rF~$l$^$9!#(B
163
+ </p>
164
+ <pre>
165
+ mail.to = 'test@loveruby.net'
166
+ mail.from = 'Minero Aoki &lt;aamine@loveruby.net&gt;'
167
+ mail.subject = 'test mail'
168
+ mail.date = Time.now
169
+ mail.mime_version = '1.0'
170
+ mail.set_content_type 'text', 'plain', {'charset'=&gt;'iso-2022-jp'}
171
+ mail.body = 'This is test mail.'
172
+ </pre>
173
+ <p>
174
+ $B$I$N%X%C%@$r%;%C%H$7$?$i$$$$$+$J$I:Y$+$$ItJ,$b$b$&$A$g$C$H%+%P!<(B
175
+ $B$7$?$$$N$G$9$,!"$^$@<BAu$7$F$$$^$;$s!#$H$j$"$($:>e5-$N%X%C%@$O(B
176
+ $B%;%C%H$7$?$[$&$,$h$$$G$7$g$&!#$^$?JV?.!&E>Aw$N>l9g$O$^$?$=$l$>$l(B
177
+ $B5,Ls$,$"$j$^$9!#$3$l$b%+%P!<$7$?$$$N$G$9$,$^$@<BAu$7$F$$$^$;$s!#(B
178
+ $B%P!<%8%g%s(B <code>1.0</code> $B$K4|BT$7$F$/$@$5$$!#(B
179
+ </p>
180
+
181
+ <p>
182
+ $B:G8e$KJ8;zNs2=$7$^$9!#(B
183
+ </p>
184
+ <pre>
185
+ str = mail.encoded
186
+ </pre>
187
+ <p>
188
+ $B:n@.85%]!<%H$K=q$-La$9$J$i!"$+$o$j$K0J2<$N$h$&$K$7$^$9!#(B
189
+ </p>
190
+ <pre>
191
+ mail.write_back
192
+ </pre>
193
+ <p>
194
+ <code>write_back</code> $B$OCf4VJ8;zNs$r2p$9$k$3$H$J$/%U%!%$%k$KD>@\=q$-$3$_$^$9!#(B
195
+ </p>
196
+
197
+ <p>
198
+ $B$h$j<BMQE*$JNc$H$7$F$O(B <code>sample/sendmail.rb</code> $B$r8+$F$/$@$5$$!#(B
199
+ </p>
200
+
201
+ </body>
202
+ </html>