tmail_es 1.2.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGES +83 -0
  3. data/LICENSE +21 -0
  4. data/NOTES +7 -0
  5. data/README +182 -0
  6. data/Rakefile +2 -0
  7. data/ext/Makefile +20 -0
  8. data/ext/tmailscanner/tmail/MANIFEST +4 -0
  9. data/ext/tmailscanner/tmail/depend +1 -0
  10. data/ext/tmailscanner/tmail/extconf.rb +33 -0
  11. data/ext/tmailscanner/tmail/tmailscanner.c +614 -0
  12. data/lib/tmail/Makefile +18 -0
  13. data/lib/tmail/address.rb +392 -0
  14. data/lib/tmail/attachments.rb +65 -0
  15. data/lib/tmail/base64.rb +46 -0
  16. data/lib/tmail/compat.rb +41 -0
  17. data/lib/tmail/config.rb +67 -0
  18. data/lib/tmail/core_extensions.rb +63 -0
  19. data/lib/tmail/encode.rb +590 -0
  20. data/lib/tmail/header.rb +962 -0
  21. data/lib/tmail/index.rb +9 -0
  22. data/lib/tmail/interface.rb +1162 -0
  23. data/lib/tmail/loader.rb +3 -0
  24. data/lib/tmail/mail.rb +578 -0
  25. data/lib/tmail/mailbox.rb +496 -0
  26. data/lib/tmail/main.rb +6 -0
  27. data/lib/tmail/mbox.rb +3 -0
  28. data/lib/tmail/net.rb +250 -0
  29. data/lib/tmail/obsolete.rb +132 -0
  30. data/lib/tmail/parser.rb +1060 -0
  31. data/lib/tmail/parser.y +416 -0
  32. data/lib/tmail/port.rb +379 -0
  33. data/lib/tmail/quoting.rb +164 -0
  34. data/lib/tmail/require_arch.rb +58 -0
  35. data/lib/tmail/scanner.rb +49 -0
  36. data/lib/tmail/scanner_r.rb +261 -0
  37. data/lib/tmail/stringio.rb +280 -0
  38. data/lib/tmail/utils.rb +361 -0
  39. data/lib/tmail/vendor/rchardet-1.3/COPYING +504 -0
  40. data/lib/tmail/vendor/rchardet-1.3/README +12 -0
  41. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +927 -0
  42. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +42 -0
  43. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +238 -0
  44. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +112 -0
  45. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +75 -0
  46. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +64 -0
  47. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +42 -0
  48. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +89 -0
  49. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +244 -0
  50. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +88 -0
  51. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +596 -0
  52. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +42 -0
  53. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +430 -0
  54. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +42 -0
  55. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +474 -0
  56. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +42 -0
  57. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +289 -0
  58. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +570 -0
  59. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +229 -0
  60. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +229 -0
  61. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +330 -0
  62. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +227 -0
  63. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +202 -0
  64. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +226 -0
  65. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +201 -0
  66. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +147 -0
  67. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +89 -0
  68. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +45 -0
  69. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +542 -0
  70. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +124 -0
  71. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +56 -0
  72. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +88 -0
  73. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +167 -0
  74. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +87 -0
  75. data/lib/tmail/vendor/rchardet-1.3/lib/rchardet.rb +67 -0
  76. data/lib/tmail/version.rb +40 -0
  77. data/lib/tmail.rb +6 -0
  78. data/setup.rb +1482 -0
  79. data/test/extctrl.rb +6 -0
  80. data/test/fixtures/apple_unquoted_content_type +44 -0
  81. data/test/fixtures/inline_attachment.txt +2095 -0
  82. data/test/fixtures/iso_8859_1_email_without_encoding_and_message_id.txt +16 -0
  83. data/test/fixtures/mailbox +414 -0
  84. data/test/fixtures/mailbox.zip +0 -0
  85. data/test/fixtures/mailbox_without_any_from_or_sender +10 -0
  86. data/test/fixtures/mailbox_without_from +11 -0
  87. data/test/fixtures/mailbox_without_return_path +12 -0
  88. data/test/fixtures/marked_as_iso_8859_1_but_it_is_utf_8.txt +33 -0
  89. data/test/fixtures/marked_as_utf_8_but_it_is_iso_8859_1.txt +56 -0
  90. data/test/fixtures/raw_attack_email_with_zero_length_whitespace +29 -0
  91. data/test/fixtures/raw_base64_decoded_string +0 -0
  92. data/test/fixtures/raw_base64_email +83 -0
  93. data/test/fixtures/raw_base64_encoded_string +1 -0
  94. data/test/fixtures/raw_email +14 -0
  95. data/test/fixtures/raw_email10 +20 -0
  96. data/test/fixtures/raw_email11 +34 -0
  97. data/test/fixtures/raw_email12 +32 -0
  98. data/test/fixtures/raw_email13 +29 -0
  99. data/test/fixtures/raw_email2 +114 -0
  100. data/test/fixtures/raw_email3 +70 -0
  101. data/test/fixtures/raw_email4 +59 -0
  102. data/test/fixtures/raw_email5 +19 -0
  103. data/test/fixtures/raw_email6 +20 -0
  104. data/test/fixtures/raw_email7 +66 -0
  105. data/test/fixtures/raw_email8 +47 -0
  106. data/test/fixtures/raw_email9 +28 -0
  107. data/test/fixtures/raw_email_bad_time +62 -0
  108. data/test/fixtures/raw_email_double_at_in_header +14 -0
  109. data/test/fixtures/raw_email_multiple_from +30 -0
  110. data/test/fixtures/raw_email_only_attachment +17 -0
  111. data/test/fixtures/raw_email_quoted_with_0d0a +14 -0
  112. data/test/fixtures/raw_email_reply +32 -0
  113. data/test/fixtures/raw_email_simple +11 -0
  114. data/test/fixtures/raw_email_string_in_date_field +17 -0
  115. data/test/fixtures/raw_email_trailing_dot +21 -0
  116. data/test/fixtures/raw_email_with_bad_date +48 -0
  117. data/test/fixtures/raw_email_with_illegal_boundary +58 -0
  118. data/test/fixtures/raw_email_with_mimepart_without_content_type +94 -0
  119. data/test/fixtures/raw_email_with_multipart_mixed_quoted_boundary +50 -0
  120. data/test/fixtures/raw_email_with_nested_attachment +100 -0
  121. data/test/fixtures/raw_email_with_partially_quoted_subject +14 -0
  122. data/test/fixtures/raw_email_with_quoted_attachment_filename +60 -0
  123. data/test/fixtures/raw_email_with_quoted_illegal_boundary +58 -0
  124. data/test/fixtures/raw_email_with_wrong_splitted_multibyte_encoded_word_subject +15 -0
  125. data/test/fixtures/the_only_part_is_a_word_document.txt +425 -0
  126. data/test/fixtures/unquoted_filename_in_attachment +177 -0
  127. data/test/kcode.rb +14 -0
  128. data/test/temp_test_one.rb +46 -0
  129. data/test/test_address.rb +1216 -0
  130. data/test/test_attachments.rb +133 -0
  131. data/test/test_base64.rb +64 -0
  132. data/test/test_encode.rb +139 -0
  133. data/test/test_header.rb +1021 -0
  134. data/test/test_helper.rb +9 -0
  135. data/test/test_mail.rb +756 -0
  136. data/test/test_mbox.rb +184 -0
  137. data/test/test_port.rb +440 -0
  138. data/test/test_quote.rb +107 -0
  139. data/test/test_scanner.rb +209 -0
  140. data/test/test_utils.rb +36 -0
  141. data/tmail_es.gemspec +35 -0
  142. metadata +257 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 00779581c5aee5e1f3e5235785d30323b5a54f71
4
+ data.tar.gz: ff1f7eb91b147445055e72dd5187a9eb9e6cd91c
5
+ SHA512:
6
+ metadata.gz: 19d50035d8ad768c78725c63dff6030dffb1ca1a25fbedb62300749d048f78aa529cf6990d15706ba5606670c1c933f7c3ff019e4d3b771dc70622777a093422
7
+ data.tar.gz: efdd3a738745e21200ca6a8e8c0fac8aeb3057d573e36f4581b0cad3747f27585939256e386d0432ce62724d3b63eb2a069aa1c7154b1b6dc4b693473860bbc3
data/CHANGES ADDED
@@ -0,0 +1,83 @@
1
+ === 1.2.7.2 / 2010-02-07
2
+
3
+ * Fixed problem for ruby 2 (escape in regex)
4
+
5
+ === 1.2.7.1 / 2010-02-07
6
+
7
+ * Fixed stray ruby-debug
8
+ * Re indented RChardet, and handled old syntax
9
+
10
+ === 1.2.3.1 / 2008-04-11
11
+
12
+ * Closed #19429 - Installing TMail on Windows with the gem
13
+
14
+ === 1.2.3 / 2008-04-11
15
+
16
+ * Closed #18881 - TMail goes into an endless loop if sent an crafted email
17
+ * Closed #19203 - TMail errors in Ruby 1.9.1 on invalid multibyte chars.
18
+ * Closed #18814 - Fixed attchment.rb failing on mail part that had a nil content-type
19
+ * Closed #18516 - Fix TMail::Mail#preamble, and add #preamble= (Charles Lowe) (233)
20
+ * Applied patch #18515 to remove ftools from test case (Charles Lowe) (232)
21
+ * A lot of documentation patches to the mail and utils and net files. Also added "log/BugTrackingLog.txt" for myself as my bug log got clobbered by the new changelog.txt format. (231)
22
+
23
+ === 1.2.2 / 2008-03-07
24
+
25
+ * Fixed install bug with gem pacakge (1.2.1 was not compiling on gem install)
26
+ * A _LOT_ more documentation...!
27
+ * More documentation - (Mikel)
28
+ * Applied Ruby 1.9 patches to the library - All tests passing now - (Mikel)
29
+ * Closed #17719 - Fixed UNIXMbox code - readonly was not working and raising an exception. Now works.
30
+ * Closed #18038 - Multiple froms not being parsed correctly, added a test case to cover this and show the correct handling - (Mikel)
31
+
32
+ === 1.2.1 / 2008-01-11
33
+
34
+ * More documentation (Mikel)
35
+ * Added 15 test cases from the Rails ActionMailer to TMail
36
+ * Changed mailscanner to tmailscanner (mailscanner is copyrighted)
37
+ * Closed Bug - Handled quote boundary being gready on content-type header (M. Mondragon)
38
+ * Closed #16025 - Fixed scanner.rb so it passes same tests as scanner.c
39
+ * Closed #16283 - Handled incorrect decoding of attachments (M. Aoki - garyo)
40
+ * Closed #16899 - HeaderField.new_from_port and added test cases to cover this code (Maarten O.)
41
+ * Closed #16900 - UNIXMbox.fromaddr missing port param and does not return Envelope Sender (Maarten O.)
42
+
43
+ === 1.2.0 / 2007-11-29
44
+
45
+ * 5 major enhancements:
46
+ * Extensive documentation work. (mikel)
47
+ * Renamed scanner_c.c to mailscanner.c. (trans)
48
+ * Removed base64 c extension. It's speed benefit was negligable (only 0.2 sec over 10000 sizable encode/decode runs) (trans)
49
+ * Closed 15445 - TMail::Mail#create_forward now returns a new Mail object that has the original mail as an encoded 7 bit multipart attachment. Also moved create_forward and create_reply from tmail/net into tmail/interface as it makes more sense to have it there. (mikel)
50
+ * Closed 15643 - TMail::Mail#reply_addresses was returning an empty array if reply_to was set to nil (ie, the header field existed but was empty) instead of returning the from address or default. (mikel)
51
+ * Closed 16025 - TMail scanner.rb would not parse ATOM chars correctly making it fail tests where the C version passed them. Fixed this by updating the Scanner.rb version to be in step with the C version (there was an extra @ symbol in the ATOM CHARS definition that was not in the C version.) (mikel)
52
+ * Fixed scanner.rb so that it would pass the same tests that the C version does - had a sundry @ symbol inside of the ATOM CHARS
53
+ * 3 minor enhancements:
54
+ * Renamed scanner_c.c to tmailscanner.c (trans)
55
+ * Changed TMail::Mail#sender to have a default "default" value of nil to be in alignment with all the other interface methods (mikel)
56
+ * Made base64_decode and base64_encode into ! versions as they are destructive on the mail body (encodes the body to base64 or decodes it), made aliases for base64_decode and base64_encode to point back to the bang versions. Doing this with a view to change base64_encode to a non destructive version (returns the encoded body) in future versions. (mikel)
57
+
58
+ === 1.1.1 / 2007-11-05
59
+
60
+ * 3 major enhancement:
61
+ * Created unified package, for installation in any platform.
62
+ * Added require_arch.rb to facilitate multi-platform support.
63
+ * If compilation fails, set NORUBYEXT="true" and reinstall.
64
+ * 3 minor enhancement:
65
+ * Fixed line wrapping of long header fields so that they wrap at the correct whitespace points.
66
+ * Fixed bug where re-assigning the mail.body to existing mail object that already had a parsed body would not re-parse the body.
67
+ * Started documenting the source code... lots more to do.
68
+
69
+ === 1.1.0 / 2007-10-28
70
+
71
+ * 1 minor enhancements:
72
+ * Changed the quoting of paramaters in the header fields to wrap double quotes around fields that are needed to be quoted.
73
+ * Removed keeping double quotes around a filename that does not need double quotes per RFC 1521
74
+ * More clean up and getting tests passing. Now standing at 2 failures out of 3366 assertions. One is the incorrect handling of "@"@test.com (returns @@test.com) and the other is a japanese encoding issue.
75
+
76
+ === 1.0.0 / 2007-10-28
77
+
78
+ * 1 major enhancement:
79
+ * TMail is now released as a GEM!
80
+ * 2 minor enhancements:
81
+ * Fixed bug 15077 - TMail now recognizes attachments as soon as they are added to the body.
82
+ * Refactored handling of quotations in header fields - now cleaner
83
+
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2001-2007 Minero Aoki
2
+ Changes Copyright (c) 2007 Mikel Lindsaar
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/NOTES ADDED
@@ -0,0 +1,7 @@
1
+ [ANN] TMail 1.2.3.1 - Minor Fix to Installer
2
+
3
+ This release just handles a bug with installing the gem on a Windows platform.
4
+
5
+ It is otherwise identical to 1.2.3
6
+
7
+ Mikel
data/README ADDED
@@ -0,0 +1,182 @@
1
+ = TMail_es
2
+ Versione di tmail con patch Euro Servizi per problemi con ruby 2.1.x in regex (Escape di parentesi quadre mancanti)
3
+
4
+ = TMail
5
+
6
+ http://tmail.rubyforge.org/
7
+
8
+ Mikel Lindsaar maintainer
9
+ Trans assitant developer
10
+ Minero Aoki original developer
11
+
12
+ == RUBY 1.9 COMPATIBILITY
13
+
14
+ Note... as of 1.2.5, TMail is not compatible with Ruby 1.9.1. We are now using rchardet
15
+ to compare encodings and there is work to do for Ruby 1.9.1 due to it's encoding
16
+ capability.
17
+
18
+ For 1.9.1 + compatibility, I suggest you look at Mail (https://github.com/mikel/mail/tree)
19
+ while this is a work in progress, it is what I am working on to replace TMail for Ruby
20
+ 1.9 and beyond.
21
+
22
+ == DESCRIPTION:
23
+
24
+ TMail is a mail handling library for Ruby. It abstracts a mail message into a usable object allowing you to read, set, add and delete headers and the mail body.
25
+
26
+ TMail is used by the Ruby on Rails web framework as the Email abstraction layer for their ActionMailer module. It is also used by the Nitro framework and many other applications on and off the web.
27
+
28
+ The goal of the TMail handling library is to be able to parse and handle raw Email sources and produce RFC compliant Emails as a result. If you find something that TMail does that violates an RFC, we want to know and we'll get it fixed fast.
29
+
30
+ == DOCUMENTATION:
31
+
32
+ The place you will want to look first is the TMail::Mail class. This has the vast majority of methods you will be using to talk to your TMail object.
33
+
34
+ == FEATURES/PROBLEMS:
35
+
36
+ TMail is fairly RFC compliant on the handling of emails.
37
+
38
+ There are also some problems in the header handling, but for 99.9% of email, you will be fine. Usually, the problems revolve around parsing incomming emails and making sense of them.
39
+
40
+ I really welcome any examples of Emails that "didn't work" with TMail so I can use them as test cases.
41
+
42
+ == SYNOPSIS:
43
+
44
+ TMail is very easy to use. You simply require the library and then pass a raw email text message into the TMail::Mail.parse method. This returns a TMail::Mail object which you can now query and run methods against to modify, inspect or add to the Email.
45
+
46
+ You can find almost all of the methods that you will use to talk to and update a TMail instance in the TMail::Mail class. I am constantly updating this code, with comments, added a fair bit and have a lot more to go!.
47
+
48
+ === Short Version:
49
+
50
+ irb(main):001:0> require 'tmail'
51
+ irb(main):002:0> raw_email = File.open("my_raw_email", 'r') { |f| @mail = f.read }
52
+ irb(main):003:0> email = TMail::Mail.parse(raw_email)
53
+ irb(main):004:0> puts email['to']
54
+ mikel@example.com
55
+ => nil
56
+ irb(main):005:0> email['to'] = 'mikel@somewhere.else.com'
57
+ => "mikel@somewhere.else.com"
58
+ irb(main):006:0> puts email['to']
59
+ mikel@somewhere.else.com
60
+ => nil
61
+
62
+ === Longer Version:
63
+
64
+ Assuming you have a single raw email in the variable my_message, you can do the following:
65
+
66
+ require 'tmail'
67
+ email = TMail::Mail.parse(my_message)
68
+
69
+ This will give you a TMail::Mail class containing your parsed message. There are other methods of opening emails through Ports.
70
+
71
+ You can view this email by a simple puts:
72
+
73
+ puts email
74
+
75
+ Return-Path: <mikel@nowhere.com>
76
+ Date: Sun, 21 Oct 2007 19:38:13 +1000
77
+ From: Mikel Lindsaar <mikel@nowhere.com>
78
+ To: mikel@somewhere.com
79
+ Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a>
80
+ Subject: Testing Email
81
+
82
+ Hello Mikel
83
+
84
+ Easy right?
85
+
86
+ === Adding a header to the EMail:
87
+
88
+ Say now that you have opened your message, you want to put in a Reply-To field. You do this like so:
89
+
90
+ email['reply-to'] = "My Email Address <my_address@anotherplace.com>"
91
+
92
+ Is it really there? Well, find out with a puts:
93
+
94
+ puts email
95
+
96
+ Return-Path: <mikel@nowhere.com>
97
+ Date: Sun, 21 Oct 2007 19:38:13 +1000
98
+ From: Mikel Lindsaar <mikel@nowhere.com>
99
+ Reply-To: My Email Address <my_address@anotherplace.com>
100
+ To: mikel@somewhere.com
101
+ Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a>
102
+ Subject: Testing Email
103
+
104
+ Hello Mikel
105
+
106
+ Yup looks good.
107
+
108
+ === Inspecting a header:
109
+
110
+ You can then inspect your added header by doing:
111
+
112
+ email['reply-to'] # => #<TMail::AddressHeader "My Email Address <my_address@anotherplace.com>">
113
+
114
+ If you just want to the actual value, not the AddressHeader object, pass to_s to this.
115
+
116
+ email['reply-to'].to_s # => "My Email Address <my_address@anotherplace.com>"
117
+
118
+ === Deleting a header:
119
+
120
+ One way of deleting a header from an Email is just assigning it nil like so:
121
+
122
+ email['reply-to'] = nil # => nil
123
+
124
+ If you now puts the email again, it will not be included:
125
+
126
+ puts email
127
+
128
+ Return-Path: <mikel@nowhere.com>
129
+ Date: Sun, 21 Oct 2007 19:38:13 +1000
130
+ From: Mikel Lindsaar <mikel@nowhere.com>
131
+ To: mikel@somewhere.com
132
+ Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a>
133
+ Subject: Testing Email
134
+
135
+ Hello Mikel
136
+
137
+ === Writing out an Email:
138
+
139
+ You can just call to_s on any email to have it serialized out as a single string with the right number of line breaks and encodings.
140
+
141
+ == CONTRIBUTING:
142
+
143
+ You can visit the {Contributing to TMail}[link:http://tmail.rubyforge.org/contributing/] to find out how to contribute to TMail, developers are welcome and wanted!
144
+
145
+ == REQUIREMENTS:
146
+
147
+ * C compiler if you want the Ruby extension for Scanner
148
+ * Ruby 1.8 or later
149
+
150
+ == INSTALLATION:
151
+
152
+ * sudo gem install tmail
153
+
154
+ Or manually,
155
+
156
+ * sudo script/setup
157
+
158
+ == LICENSE:
159
+
160
+ (The MIT License)
161
+
162
+ Copyright (c) 2007 FIX
163
+
164
+ Permission is hereby granted, free of charge, to any person obtaining
165
+ a copy of this software and associated documentation files (the
166
+ 'Software'), to deal in the Software without restriction, including
167
+ without limitation the rights to use, copy, modify, merge, publish,
168
+ distribute, sublicense, and/or sell copies of the Software, and to
169
+ permit persons to whom the Software is furnished to do so, subject to
170
+ the following conditions:
171
+
172
+ The above copyright notice and this permission notice shall be
173
+ included in all copies or substantial portions of the Software.
174
+
175
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
176
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
177
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
178
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
179
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
180
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
181
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
182
+
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), "setup.rb")
2
+
data/ext/Makefile ADDED
@@ -0,0 +1,20 @@
1
+ #
2
+ # ext/tmail/Makefile
3
+ #
4
+
5
+ .PHONY: tmailscanner clean distclean
6
+
7
+ all: tmailscanner
8
+
9
+ tmailscanner: tmailscanner/tmail/Makefile
10
+ cd tmailscanner/tmail; $(MAKE)
11
+
12
+ tmailscanner/tmail/Makefile: tmailscanner/tmail/extconf.rb
13
+ cd tmailscanner/tmail; ruby extconf.rb
14
+
15
+ clean:
16
+ cd tmailscanner/tmail; $(MAKE) clean
17
+
18
+ distclean:
19
+ cd tmailscanner/tmail; $(MAKE) distclean
20
+
@@ -0,0 +1,4 @@
1
+ MANIFEST
2
+ tmailscanner.c
3
+ extconf.rb
4
+ depend
@@ -0,0 +1 @@
1
+ tmailscanner.o: tmailscanner.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h Makefile
@@ -0,0 +1,33 @@
1
+ require 'mkmf'
2
+ require 'rbconfig'
3
+
4
+ extension_name = 'tmailscanner'
5
+
6
+ windows = (/djgpp|(cyg|ms|bcc)win|mingw/ =~ RUBY_PLATFORM)
7
+
8
+ # For now use pure Ruby tmailscanner if on Windows, since
9
+ # most Window's users don't have developer tools needed.
10
+
11
+ if (ENV['NORUBYEXT'] == 'true' || windows)
12
+ if windows
13
+ File.open('make.bat', 'w') do |f|
14
+ f << 'echo Native extension will be omitted.'
15
+ end
16
+ File.open('nmake.bat', 'w') do |f|
17
+ f << 'echo Native extension will be omitted.'
18
+ end
19
+ end
20
+ File.open('Makefile', 'w') do |f|
21
+ f << "all:\n"
22
+ f << "install:\n"
23
+ end
24
+ else
25
+ #dir_config(extension_name)
26
+ if windows && ENV['make'].nil?
27
+ $LIBS += " msvcprt.lib"
28
+ else
29
+ $CFLAGS += " -D_FILE_OFFSET_BITS=64" #???
30
+ end
31
+ create_makefile(extension_name)
32
+ end
33
+