rack-mail_exception 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (321) hide show
  1. data/.document +5 -0
  2. data/.gitignore +22 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +38 -0
  5. data/Rakefile +56 -0
  6. data/VERSION +1 -0
  7. data/lib/rack/mail_exception.rb +103 -0
  8. data/test/helper.rb +13 -0
  9. data/test/test_rack_mail_exception.rb +93 -0
  10. data/vendor/mail/.bundle/config +2 -0
  11. data/vendor/mail/CHANGELOG.rdoc +370 -0
  12. data/vendor/mail/Dependencies.txt +3 -0
  13. data/vendor/mail/Gemfile +17 -0
  14. data/vendor/mail/README.rdoc +572 -0
  15. data/vendor/mail/ROADMAP +92 -0
  16. data/vendor/mail/Rakefile +41 -0
  17. data/vendor/mail/TODO.rdoc +9 -0
  18. data/vendor/mail/lib/mail.rb +76 -0
  19. data/vendor/mail/lib/mail/attachments_list.rb +99 -0
  20. data/vendor/mail/lib/mail/body.rb +287 -0
  21. data/vendor/mail/lib/mail/configuration.rb +67 -0
  22. data/vendor/mail/lib/mail/core_extensions/blank.rb +26 -0
  23. data/vendor/mail/lib/mail/core_extensions/nil.rb +11 -0
  24. data/vendor/mail/lib/mail/core_extensions/string.rb +27 -0
  25. data/vendor/mail/lib/mail/elements.rb +14 -0
  26. data/vendor/mail/lib/mail/elements/address.rb +306 -0
  27. data/vendor/mail/lib/mail/elements/address_list.rb +74 -0
  28. data/vendor/mail/lib/mail/elements/content_disposition_element.rb +30 -0
  29. data/vendor/mail/lib/mail/elements/content_location_element.rb +25 -0
  30. data/vendor/mail/lib/mail/elements/content_transfer_encoding_element.rb +24 -0
  31. data/vendor/mail/lib/mail/elements/content_type_element.rb +35 -0
  32. data/vendor/mail/lib/mail/elements/date_time_element.rb +26 -0
  33. data/vendor/mail/lib/mail/elements/envelope_from_element.rb +34 -0
  34. data/vendor/mail/lib/mail/elements/message_ids_element.rb +29 -0
  35. data/vendor/mail/lib/mail/elements/mime_version_element.rb +26 -0
  36. data/vendor/mail/lib/mail/elements/phrase_list.rb +21 -0
  37. data/vendor/mail/lib/mail/elements/received_element.rb +30 -0
  38. data/vendor/mail/lib/mail/encodings.rb +258 -0
  39. data/vendor/mail/lib/mail/encodings/7bit.rb +31 -0
  40. data/vendor/mail/lib/mail/encodings/8bit.rb +31 -0
  41. data/vendor/mail/lib/mail/encodings/base64.rb +33 -0
  42. data/vendor/mail/lib/mail/encodings/binary.rb +31 -0
  43. data/vendor/mail/lib/mail/encodings/quoted_printable.rb +38 -0
  44. data/vendor/mail/lib/mail/encodings/transfer_encoding.rb +58 -0
  45. data/vendor/mail/lib/mail/envelope.rb +35 -0
  46. data/vendor/mail/lib/mail/field.rb +223 -0
  47. data/vendor/mail/lib/mail/field_list.rb +33 -0
  48. data/vendor/mail/lib/mail/fields.rb +35 -0
  49. data/vendor/mail/lib/mail/fields/bcc_field.rb +56 -0
  50. data/vendor/mail/lib/mail/fields/cc_field.rb +55 -0
  51. data/vendor/mail/lib/mail/fields/comments_field.rb +41 -0
  52. data/vendor/mail/lib/mail/fields/common/address_container.rb +16 -0
  53. data/vendor/mail/lib/mail/fields/common/common_address.rb +125 -0
  54. data/vendor/mail/lib/mail/fields/common/common_date.rb +42 -0
  55. data/vendor/mail/lib/mail/fields/common/common_field.rb +50 -0
  56. data/vendor/mail/lib/mail/fields/common/common_message_id.rb +43 -0
  57. data/vendor/mail/lib/mail/fields/common/parameter_hash.rb +52 -0
  58. data/vendor/mail/lib/mail/fields/content_description_field.rb +19 -0
  59. data/vendor/mail/lib/mail/fields/content_disposition_field.rb +69 -0
  60. data/vendor/mail/lib/mail/fields/content_id_field.rb +63 -0
  61. data/vendor/mail/lib/mail/fields/content_location_field.rb +42 -0
  62. data/vendor/mail/lib/mail/fields/content_transfer_encoding_field.rb +50 -0
  63. data/vendor/mail/lib/mail/fields/content_type_field.rb +185 -0
  64. data/vendor/mail/lib/mail/fields/date_field.rb +55 -0
  65. data/vendor/mail/lib/mail/fields/from_field.rb +55 -0
  66. data/vendor/mail/lib/mail/fields/in_reply_to_field.rb +55 -0
  67. data/vendor/mail/lib/mail/fields/keywords_field.rb +44 -0
  68. data/vendor/mail/lib/mail/fields/message_id_field.rb +83 -0
  69. data/vendor/mail/lib/mail/fields/mime_version_field.rb +53 -0
  70. data/vendor/mail/lib/mail/fields/optional_field.rb +13 -0
  71. data/vendor/mail/lib/mail/fields/received_field.rb +67 -0
  72. data/vendor/mail/lib/mail/fields/references_field.rb +55 -0
  73. data/vendor/mail/lib/mail/fields/reply_to_field.rb +55 -0
  74. data/vendor/mail/lib/mail/fields/resent_bcc_field.rb +55 -0
  75. data/vendor/mail/lib/mail/fields/resent_cc_field.rb +55 -0
  76. data/vendor/mail/lib/mail/fields/resent_date_field.rb +35 -0
  77. data/vendor/mail/lib/mail/fields/resent_from_field.rb +55 -0
  78. data/vendor/mail/lib/mail/fields/resent_message_id_field.rb +34 -0
  79. data/vendor/mail/lib/mail/fields/resent_sender_field.rb +62 -0
  80. data/vendor/mail/lib/mail/fields/resent_to_field.rb +55 -0
  81. data/vendor/mail/lib/mail/fields/return_path_field.rb +64 -0
  82. data/vendor/mail/lib/mail/fields/sender_field.rb +67 -0
  83. data/vendor/mail/lib/mail/fields/structured_field.rb +51 -0
  84. data/vendor/mail/lib/mail/fields/subject_field.rb +16 -0
  85. data/vendor/mail/lib/mail/fields/to_field.rb +55 -0
  86. data/vendor/mail/lib/mail/fields/unstructured_field.rb +166 -0
  87. data/vendor/mail/lib/mail/header.rb +262 -0
  88. data/vendor/mail/lib/mail/mail.rb +234 -0
  89. data/vendor/mail/lib/mail/message.rb +1867 -0
  90. data/vendor/mail/lib/mail/network.rb +9 -0
  91. data/vendor/mail/lib/mail/network/delivery_methods/file_delivery.rb +40 -0
  92. data/vendor/mail/lib/mail/network/delivery_methods/sendmail.rb +62 -0
  93. data/vendor/mail/lib/mail/network/delivery_methods/smtp.rb +110 -0
  94. data/vendor/mail/lib/mail/network/delivery_methods/test_mailer.rb +40 -0
  95. data/vendor/mail/lib/mail/network/retriever_methods/imap.rb +18 -0
  96. data/vendor/mail/lib/mail/network/retriever_methods/pop3.rb +149 -0
  97. data/vendor/mail/lib/mail/parsers/address_lists.rb +64 -0
  98. data/vendor/mail/lib/mail/parsers/address_lists.treetop +19 -0
  99. data/vendor/mail/lib/mail/parsers/content_disposition.rb +387 -0
  100. data/vendor/mail/lib/mail/parsers/content_disposition.treetop +46 -0
  101. data/vendor/mail/lib/mail/parsers/content_location.rb +139 -0
  102. data/vendor/mail/lib/mail/parsers/content_location.treetop +20 -0
  103. data/vendor/mail/lib/mail/parsers/content_transfer_encoding.rb +162 -0
  104. data/vendor/mail/lib/mail/parsers/content_transfer_encoding.treetop +20 -0
  105. data/vendor/mail/lib/mail/parsers/content_type.rb +539 -0
  106. data/vendor/mail/lib/mail/parsers/content_type.treetop +58 -0
  107. data/vendor/mail/lib/mail/parsers/date_time.rb +114 -0
  108. data/vendor/mail/lib/mail/parsers/date_time.treetop +11 -0
  109. data/vendor/mail/lib/mail/parsers/envelope_from.rb +194 -0
  110. data/vendor/mail/lib/mail/parsers/envelope_from.treetop +32 -0
  111. data/vendor/mail/lib/mail/parsers/message_ids.rb +45 -0
  112. data/vendor/mail/lib/mail/parsers/message_ids.treetop +15 -0
  113. data/vendor/mail/lib/mail/parsers/mime_version.rb +144 -0
  114. data/vendor/mail/lib/mail/parsers/mime_version.treetop +19 -0
  115. data/vendor/mail/lib/mail/parsers/phrase_lists.rb +45 -0
  116. data/vendor/mail/lib/mail/parsers/phrase_lists.treetop +15 -0
  117. data/vendor/mail/lib/mail/parsers/received.rb +71 -0
  118. data/vendor/mail/lib/mail/parsers/received.treetop +11 -0
  119. data/vendor/mail/lib/mail/parsers/rfc2045.rb +464 -0
  120. data/vendor/mail/lib/mail/parsers/rfc2045.treetop +36 -0
  121. data/vendor/mail/lib/mail/parsers/rfc2822.rb +5318 -0
  122. data/vendor/mail/lib/mail/parsers/rfc2822.treetop +410 -0
  123. data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.rb +3757 -0
  124. data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.treetop +241 -0
  125. data/vendor/mail/lib/mail/part.rb +102 -0
  126. data/vendor/mail/lib/mail/parts_list.rb +34 -0
  127. data/vendor/mail/lib/mail/patterns.rb +30 -0
  128. data/vendor/mail/lib/mail/utilities.rb +181 -0
  129. data/vendor/mail/lib/mail/version.rb +10 -0
  130. data/vendor/mail/lib/mail/version_specific/ruby_1_8.rb +97 -0
  131. data/vendor/mail/lib/mail/version_specific/ruby_1_9.rb +87 -0
  132. data/vendor/mail/lib/tasks/corpus.rake +125 -0
  133. data/vendor/mail/lib/tasks/treetop.rake +10 -0
  134. data/vendor/mail/mail.gemspec +20 -0
  135. data/vendor/mail/reference/US ASCII Table.txt +130 -0
  136. data/vendor/mail/reference/rfc1035 Domain Implementation and Specification.txt +3083 -0
  137. data/vendor/mail/reference/rfc1049 Content-Type Header Field for Internet Messages.txt +451 -0
  138. data/vendor/mail/reference/rfc1344 Implications of MIME for Internet Mail Gateways.txt +586 -0
  139. data/vendor/mail/reference/rfc1345 Character Mnemonics & Character Sets.txt +5761 -0
  140. data/vendor/mail/reference/rfc1524 A User Agent Configuration Mechanism For Multimedia Mail Format Information.txt +675 -0
  141. data/vendor/mail/reference/rfc1652 SMTP Service Extension for 8bit-MIMEtransport.txt +339 -0
  142. data/vendor/mail/reference/rfc1892 Multipart Report .txt +227 -0
  143. data/vendor/mail/reference/rfc1893 Mail System Status Codes.txt +843 -0
  144. data/vendor/mail/reference/rfc2045 Multipurpose Internet Mail Extensions (1).txt +1739 -0
  145. data/vendor/mail/reference/rfc2046 Multipurpose Internet Mail Extensions (2).txt +2467 -0
  146. data/vendor/mail/reference/rfc2047 Multipurpose Internet Mail Extensions (3).txt +843 -0
  147. data/vendor/mail/reference/rfc2048 Multipurpose Internet Mail Extensions (4).txt +1180 -0
  148. data/vendor/mail/reference/rfc2049 Multipurpose Internet Mail Extensions (5).txt +1347 -0
  149. data/vendor/mail/reference/rfc2111 Content-ID and Message-ID URLs.txt +283 -0
  150. data/vendor/mail/reference/rfc2183 Content-Disposition Header Field.txt +675 -0
  151. data/vendor/mail/reference/rfc2231 MIME Parameter Value and Encoded Word Extensions.txt +563 -0
  152. data/vendor/mail/reference/rfc2387 MIME Multipart-Related Content-type.txt +563 -0
  153. data/vendor/mail/reference/rfc2821 Simple Mail Transfer Protocol.txt +3711 -0
  154. data/vendor/mail/reference/rfc2822 Internet Message Format.txt +2859 -0
  155. data/vendor/mail/reference/rfc3462 Reporting of Mail System Administrative Messages.txt +396 -0
  156. data/vendor/mail/reference/rfc3696 Checking and Transformation of Names.txt +898 -0
  157. data/vendor/mail/reference/rfc4155 The application-mbox Media Type.txt +502 -0
  158. data/vendor/mail/reference/rfc4234 Augmented BNF for Syntax Specifications: ABNF.txt +899 -0
  159. data/vendor/mail/reference/rfc822 Standard for the Format of ARPA Internet Text Messages.txt +2900 -0
  160. data/vendor/mail/spec/environment.rb +15 -0
  161. data/vendor/mail/spec/features/making_a_new_message.feature +14 -0
  162. data/vendor/mail/spec/features/steps/env.rb +6 -0
  163. data/vendor/mail/spec/features/steps/making_a_new_message_steps.rb +11 -0
  164. data/vendor/mail/spec/fixtures/attachments/basic_email.eml +31 -0
  165. data/vendor/mail/spec/fixtures/attachments/test.gif +0 -0
  166. data/vendor/mail/spec/fixtures/attachments/test.jpg +0 -0
  167. data/vendor/mail/spec/fixtures/attachments/test.pdf +0 -0
  168. data/vendor/mail/spec/fixtures/attachments/test.png +0 -0
  169. data/vendor/mail/spec/fixtures/attachments/test.tiff +0 -0
  170. data/vendor/mail/spec/fixtures/attachments/test.zip +0 -0
  171. data/vendor/mail/spec/fixtures/attachments//343/201/246/343/201/231/343/201/250.txt +2 -0
  172. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_disposition.eml +29 -0
  173. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_location.eml +32 -0
  174. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_message_rfc822.eml +92 -0
  175. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_only_email.eml +17 -0
  176. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_pdf.eml +70 -0
  177. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_encoded_name.eml +47 -0
  178. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_quoted_filename.eml +60 -0
  179. data/vendor/mail/spec/fixtures/emails/error_emails/cant_parse_from.eml +33 -0
  180. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_7-bit.eml +231 -0
  181. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_empty.eml +33 -0
  182. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_plain.eml +148 -0
  183. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_qp_with_space.eml +53 -0
  184. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_spam.eml +44 -0
  185. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_text-html.eml +50 -0
  186. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_8bits.eml +770 -0
  187. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_semi_colon.eml +269 -0
  188. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_x_uuencode.eml +79 -0
  189. data/vendor/mail/spec/fixtures/emails/error_emails/empty_group_lists.eml +162 -0
  190. data/vendor/mail/spec/fixtures/emails/error_emails/header_fields_with_empty_values.eml +33 -0
  191. data/vendor/mail/spec/fixtures/emails/error_emails/missing_body.eml +16 -0
  192. data/vendor/mail/spec/fixtures/emails/error_emails/missing_content_disposition.eml +43 -0
  193. data/vendor/mail/spec/fixtures/emails/error_emails/multiple_content_types.eml +25 -0
  194. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email11.eml +34 -0
  195. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email12.eml +32 -0
  196. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email2.eml +114 -0
  197. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email4.eml +59 -0
  198. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email7.eml +66 -0
  199. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_encoded_stack_level_too_deep.eml +53 -0
  200. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_illegal_boundary.eml +58 -0
  201. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_mimepart_without_content_type.eml +94 -0
  202. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_multipart_mixed_quoted_boundary.eml +50 -0
  203. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_nested_attachment.eml +100 -0
  204. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_quoted_illegal_boundary.eml +58 -0
  205. data/vendor/mail/spec/fixtures/emails/mime_emails/sig_only_email.eml +29 -0
  206. data/vendor/mail/spec/fixtures/emails/mime_emails/two_from_in_message.eml +42 -0
  207. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese.eml +9 -0
  208. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment.eml +27 -0
  209. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment_long_name.eml +44 -0
  210. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce1.eml +179 -0
  211. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce2.eml +179 -0
  212. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_422.eml +98 -0
  213. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_530.eml +97 -0
  214. data/vendor/mail/spec/fixtures/emails/plain_emails/basic_email.eml +31 -0
  215. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email.eml +14 -0
  216. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email10.eml +20 -0
  217. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email5.eml +19 -0
  218. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email6.eml +20 -0
  219. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email8.eml +47 -0
  220. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_bad_time.eml +62 -0
  221. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_double_at_in_header.eml +14 -0
  222. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_incorrect_header.eml +28 -0
  223. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_multiple_from.eml +30 -0
  224. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_quoted_with_0d0a.eml +14 -0
  225. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_reply.eml +32 -0
  226. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_simple.eml +11 -0
  227. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_string_in_date_field.eml +17 -0
  228. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_trailing_dot.eml +21 -0
  229. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_bad_date.eml +48 -0
  230. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_partially_quoted_subject.eml +14 -0
  231. data/vendor/mail/spec/fixtures/emails/rfc2822/example01.eml +8 -0
  232. data/vendor/mail/spec/fixtures/emails/rfc2822/example02.eml +9 -0
  233. data/vendor/mail/spec/fixtures/emails/rfc2822/example03.eml +7 -0
  234. data/vendor/mail/spec/fixtures/emails/rfc2822/example04.eml +7 -0
  235. data/vendor/mail/spec/fixtures/emails/rfc2822/example05.eml +8 -0
  236. data/vendor/mail/spec/fixtures/emails/rfc2822/example06.eml +10 -0
  237. data/vendor/mail/spec/fixtures/emails/rfc2822/example07.eml +9 -0
  238. data/vendor/mail/spec/fixtures/emails/rfc2822/example08.eml +12 -0
  239. data/vendor/mail/spec/fixtures/emails/rfc2822/example09.eml +15 -0
  240. data/vendor/mail/spec/fixtures/emails/rfc2822/example10.eml +15 -0
  241. data/vendor/mail/spec/fixtures/emails/rfc2822/example11.eml +6 -0
  242. data/vendor/mail/spec/fixtures/emails/rfc2822/example12.eml +8 -0
  243. data/vendor/mail/spec/fixtures/emails/rfc2822/example13.eml +10 -0
  244. data/vendor/mail/spec/fixtures/emails/sample_output_multipart +0 -0
  245. data/vendor/mail/spec/mail/attachments_list_spec.rb +214 -0
  246. data/vendor/mail/spec/mail/body_spec.rb +385 -0
  247. data/vendor/mail/spec/mail/configuration_spec.rb +19 -0
  248. data/vendor/mail/spec/mail/core_extensions/string_spec.rb +62 -0
  249. data/vendor/mail/spec/mail/core_extensions_spec.rb +99 -0
  250. data/vendor/mail/spec/mail/elements/address_list_spec.rb +109 -0
  251. data/vendor/mail/spec/mail/elements/address_spec.rb +609 -0
  252. data/vendor/mail/spec/mail/elements/date_time_element_spec.rb +20 -0
  253. data/vendor/mail/spec/mail/elements/envelope_from_element_spec.rb +31 -0
  254. data/vendor/mail/spec/mail/elements/message_ids_element_spec.rb +43 -0
  255. data/vendor/mail/spec/mail/elements/phrase_list_spec.rb +22 -0
  256. data/vendor/mail/spec/mail/elements/received_element_spec.rb +34 -0
  257. data/vendor/mail/spec/mail/encoding_spec.rb +189 -0
  258. data/vendor/mail/spec/mail/encodings/base64_spec.rb +25 -0
  259. data/vendor/mail/spec/mail/encodings/quoted_printable_spec.rb +25 -0
  260. data/vendor/mail/spec/mail/encodings_spec.rb +664 -0
  261. data/vendor/mail/spec/mail/example_emails_spec.rb +303 -0
  262. data/vendor/mail/spec/mail/field_list_spec.rb +33 -0
  263. data/vendor/mail/spec/mail/field_spec.rb +198 -0
  264. data/vendor/mail/spec/mail/fields/bcc_field_spec.rb +89 -0
  265. data/vendor/mail/spec/mail/fields/cc_field_spec.rb +79 -0
  266. data/vendor/mail/spec/mail/fields/comments_field_spec.rb +25 -0
  267. data/vendor/mail/spec/mail/fields/common/address_container_spec.rb +18 -0
  268. data/vendor/mail/spec/mail/fields/common/common_address_spec.rb +132 -0
  269. data/vendor/mail/spec/mail/fields/common/common_date_spec.rb +25 -0
  270. data/vendor/mail/spec/mail/fields/common/common_field_spec.rb +69 -0
  271. data/vendor/mail/spec/mail/fields/common/common_message_id_spec.rb +30 -0
  272. data/vendor/mail/spec/mail/fields/common/parameter_hash_spec.rb +56 -0
  273. data/vendor/mail/spec/mail/fields/content_description_field_spec.rb +39 -0
  274. data/vendor/mail/spec/mail/fields/content_disposition_field_spec.rb +55 -0
  275. data/vendor/mail/spec/mail/fields/content_id_field_spec.rb +117 -0
  276. data/vendor/mail/spec/mail/fields/content_location_field_spec.rb +46 -0
  277. data/vendor/mail/spec/mail/fields/content_transfer_encoding_field_spec.rb +113 -0
  278. data/vendor/mail/spec/mail/fields/content_type_field_spec.rb +678 -0
  279. data/vendor/mail/spec/mail/fields/date_field_spec.rb +73 -0
  280. data/vendor/mail/spec/mail/fields/envelope_spec.rb +48 -0
  281. data/vendor/mail/spec/mail/fields/from_field_spec.rb +89 -0
  282. data/vendor/mail/spec/mail/fields/in_reply_to_field_spec.rb +62 -0
  283. data/vendor/mail/spec/mail/fields/keywords_field_spec.rb +66 -0
  284. data/vendor/mail/spec/mail/fields/message_id_field_spec.rb +147 -0
  285. data/vendor/mail/spec/mail/fields/mime_version_field_spec.rb +166 -0
  286. data/vendor/mail/spec/mail/fields/received_field_spec.rb +44 -0
  287. data/vendor/mail/spec/mail/fields/references_field_spec.rb +35 -0
  288. data/vendor/mail/spec/mail/fields/reply_to_field_spec.rb +67 -0
  289. data/vendor/mail/spec/mail/fields/resent_bcc_field_spec.rb +66 -0
  290. data/vendor/mail/spec/mail/fields/resent_cc_field_spec.rb +66 -0
  291. data/vendor/mail/spec/mail/fields/resent_date_field_spec.rb +39 -0
  292. data/vendor/mail/spec/mail/fields/resent_from_field_spec.rb +66 -0
  293. data/vendor/mail/spec/mail/fields/resent_message_id_field_spec.rb +24 -0
  294. data/vendor/mail/spec/mail/fields/resent_sender_field_spec.rb +58 -0
  295. data/vendor/mail/spec/mail/fields/resent_to_field_spec.rb +66 -0
  296. data/vendor/mail/spec/mail/fields/return_path_field_spec.rb +52 -0
  297. data/vendor/mail/spec/mail/fields/sender_field_spec.rb +58 -0
  298. data/vendor/mail/spec/mail/fields/structured_field_spec.rb +72 -0
  299. data/vendor/mail/spec/mail/fields/to_field_spec.rb +92 -0
  300. data/vendor/mail/spec/mail/fields/unstructured_field_spec.rb +134 -0
  301. data/vendor/mail/spec/mail/header_spec.rb +578 -0
  302. data/vendor/mail/spec/mail/mail_spec.rb +34 -0
  303. data/vendor/mail/spec/mail/message_spec.rb +1409 -0
  304. data/vendor/mail/spec/mail/mime_messages_spec.rb +435 -0
  305. data/vendor/mail/spec/mail/multipart_report_spec.rb +112 -0
  306. data/vendor/mail/spec/mail/network/delivery_methods/file_delivery_spec.rb +79 -0
  307. data/vendor/mail/spec/mail/network/delivery_methods/sendmail_spec.rb +125 -0
  308. data/vendor/mail/spec/mail/network/delivery_methods/smtp_spec.rb +133 -0
  309. data/vendor/mail/spec/mail/network/delivery_methods/test_mailer_spec.rb +57 -0
  310. data/vendor/mail/spec/mail/network/retriever_methods/pop3_spec.rb +180 -0
  311. data/vendor/mail/spec/mail/network_spec.rb +359 -0
  312. data/vendor/mail/spec/mail/parsers/address_lists_parser_spec.rb +15 -0
  313. data/vendor/mail/spec/mail/parsers/content_transfer_encoding_parser_spec.rb +72 -0
  314. data/vendor/mail/spec/mail/part_spec.rb +129 -0
  315. data/vendor/mail/spec/mail/parts_list_spec.rb +12 -0
  316. data/vendor/mail/spec/mail/round_tripping_spec.rb +44 -0
  317. data/vendor/mail/spec/mail/utilities_spec.rb +327 -0
  318. data/vendor/mail/spec/mail/version_specific/escape_paren_1_8_spec.rb +32 -0
  319. data/vendor/mail/spec/matchers/break_down_to.rb +35 -0
  320. data/vendor/mail/spec/spec_helper.rb +163 -0
  321. metadata +442 -0
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,22 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
22
+ .rvmrc
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Cyril David
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,38 @@
1
+ = mail-exception
2
+
3
+ A basic exception mailer inspired by rack/contrib/mailexceptions,
4
+ but uses the mail gem instead of tmail.
5
+
6
+ == Example usage:
7
+
8
+ require 'rubygems'
9
+
10
+ use Rack::MailException, :to => "me@me.com"
11
+
12
+ # if you have a different settings from the default Mail settings
13
+ # you need to configure it.
14
+ # sample GMail SMTP config follows:
15
+ Mail.default do
16
+ delivery_method :smtp,
17
+ :address: "smtp.gmail.com"
18
+ :port: "587"
19
+ :domain: "yourdomain.com"
20
+ :user_name: "user@yourdomain.com"
21
+ :password: "__PASSWORD__"
22
+ :authentication: :plain
23
+ :enable_starttls_auto: true
24
+ end
25
+
26
+ == Note on Patches/Pull Requests
27
+
28
+ * Fork the project.
29
+ * Make your feature addition or bug fix.
30
+ * Add tests for it. This is important so I don't break it in a
31
+ future version unintentionally.
32
+ * Commit, do not mess with rakefile, version, or history.
33
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
34
+ * Send me a pull request. Bonus points for topic branches.
35
+
36
+ == Copyright
37
+
38
+ Copyright (c) 2010 Cyril David. See LICENSE for details.
@@ -0,0 +1,56 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "rack-mail_exception"
8
+ gem.summary = %Q{Rack middleware for sending exceptions}
9
+ gem.description = %Q{Uses the mail library for sending exceptions}
10
+ gem.email = "cyx.ucron@gmail.com"
11
+ gem.homepage = "http://github.com/sinefunc/mail-exception"
12
+ gem.authors = ["Cyril David"]
13
+ gem.add_dependency "mime-types", ">= 0"
14
+ gem.add_development_dependency "contest", ">= 0"
15
+ gem.add_development_dependency "sinatra", ">= 0"
16
+ gem.add_development_dependency "rack-test", ">= 0"
17
+ gem.add_development_dependency "mocha", ">= 0"
18
+ end
19
+ Jeweler::GemcutterTasks.new
20
+ rescue LoadError
21
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
22
+ end
23
+
24
+ require 'rake/testtask'
25
+ Rake::TestTask.new(:test) do |test|
26
+ test.libs << 'lib' << 'test'
27
+ test.pattern = 'test/**/test_*.rb'
28
+ test.verbose = true
29
+ end
30
+
31
+ begin
32
+ require 'rcov/rcovtask'
33
+ Rcov::RcovTask.new do |test|
34
+ test.libs << 'test'
35
+ test.pattern = 'test/**/test_*.rb'
36
+ test.verbose = true
37
+ end
38
+ rescue LoadError
39
+ task :rcov do
40
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
41
+ end
42
+ end
43
+
44
+ task :test => :check_dependencies
45
+
46
+ task :default => :test
47
+
48
+ require 'rake/rdoctask'
49
+ Rake::RDocTask.new do |rdoc|
50
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
51
+
52
+ rdoc.rdoc_dir = 'rdoc'
53
+ rdoc.title = "mail-exception #{version}"
54
+ rdoc.rdoc_files.include('README*')
55
+ rdoc.rdoc_files.include('lib/**/*.rb')
56
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,103 @@
1
+ require 'mime/types'
2
+ require 'erb'
3
+
4
+ if RUBY_VERSION >= "1.9.1"
5
+ # The bundled mail library doesn't include activesupport.
6
+ # Caveat is, it needs Ruby 1.9.x at least for the multibyte character
7
+ # support. Why bother? Because ActiveSupport is evil, and we don't use
8
+ # Rails. The memory overhead is just not worth it.
9
+ $:.unshift(File.join(File.dirname(__FILE__), '..', '..', 'vendor', 'mail', 'lib'))
10
+ end
11
+
12
+ require 'mail'
13
+
14
+ module Rack
15
+ class MailException
16
+ VERSION = "0.0.1"
17
+
18
+ FILTERING = %(['"]?%s['"]?=>?([^&\s]*))
19
+
20
+ def initialize(app, options = {})
21
+ @to = options[:to] || raise(ArgumentError, ":to is required")
22
+ @from = options[:from] || raise(ArgumentError, ":from is required")
23
+ @subject = options[:subject] || "[Application Exception] %s"
24
+
25
+ @filters = Array(options[:filters])
26
+ @app = app
27
+ end
28
+
29
+ def call(env)
30
+ status, headers, body =
31
+ begin
32
+ @app.call(env)
33
+ rescue Exception => ex
34
+ notify ex, env
35
+ raise ex
36
+ end
37
+
38
+ [status, headers, body]
39
+ end
40
+
41
+ private
42
+ def notify(exception, env)
43
+ text = ERB.new(TEMPLATE).result(binding)
44
+
45
+ Mail.deliver(
46
+ :to => @to,
47
+ :from => @from,
48
+ :subject => @subject % exception,
49
+ :body => sanitize_filtered_parameters(text)
50
+ )
51
+ end
52
+
53
+ def request_body(env)
54
+ if io = env['rack.input']
55
+ io.rewind if io.respond_to?(:rewind)
56
+ io.read
57
+ end
58
+ end
59
+
60
+ def sanitize_filtered_parameters(str)
61
+ str.dup.tap do |ret|
62
+ @filters.each do |filter|
63
+ ret.gsub!(Regexp.new(FILTERING % filter)) { |m|
64
+ m.gsub($1, '[FILTERED]')
65
+ }
66
+ end
67
+ end
68
+ end
69
+
70
+ # Taken from rack/contrib/mailexceptions
71
+ TEMPLATE = (<<-'EMAIL').gsub(/^ {4}/, '')
72
+ A <%= exception.class.to_s %> occured: <%= exception.to_s %>
73
+ <% if body = request_body(env) %>
74
+
75
+ ===================================================================
76
+ Request Body:
77
+ ===================================================================
78
+
79
+ <%= body.gsub(/^/, ' ') %>
80
+ <% end %>
81
+
82
+ ===================================================================
83
+ Rack Environment:
84
+ ===================================================================
85
+
86
+ PID: <%= $$ %>
87
+ PWD: <%= Dir.getwd %>
88
+
89
+ <%= env.to_a.
90
+ sort{|a,b| a.first <=> b.first}.
91
+ map{ |k,v| "%-25s%p" % [k+':', v] }.
92
+ join("\n ") %>
93
+
94
+ <% if exception.respond_to?(:backtrace) %>
95
+ ===================================================================
96
+ Backtrace:
97
+ ===================================================================
98
+
99
+ <%= exception.backtrace.join("\n ") %>
100
+ <% end %>
101
+ EMAIL
102
+ end
103
+ end
@@ -0,0 +1,13 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'contest'
4
+ require 'sinatra/base'
5
+ require 'rack/test'
6
+ require 'mocha'
7
+
8
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
9
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
10
+ require 'rack/mail_exception'
11
+
12
+ class Test::Unit::TestCase
13
+ end
@@ -0,0 +1,93 @@
1
+ require 'helper'
2
+
3
+ class TestRackMailException < Test::Unit::TestCase
4
+ class HelloWorld < Sinatra::Base
5
+ use Rack::MailException, :to => "me@me.com", :from => "you@you.com",
6
+ :subject => "[FooBar Exception] %s"
7
+
8
+ enable :raise_errors
9
+
10
+ get '/success' do
11
+ "Successful"
12
+ end
13
+
14
+ get '/failure' do
15
+ raise "Failed"
16
+ "Failure"
17
+ end
18
+
19
+ post '/login' do
20
+ raise 'Login Failed'
21
+ end
22
+ end
23
+
24
+ class FilteredPassword < Sinatra::Base
25
+ use Rack::MailException, :to => "me@me.com", :from => "you@you.com",
26
+ :subject => "[FooBar Exception] %s",
27
+ :filters => %w(password password_confirmation)
28
+
29
+ post '/login' do
30
+ raise "Login Failure"
31
+ end
32
+ end
33
+
34
+ def app
35
+ HelloWorld.new
36
+ end
37
+
38
+ include Rack::Test::Methods
39
+
40
+ context "when going to /success" do
41
+ should "render properly" do
42
+ get "/success"
43
+
44
+ assert_equal 'Successful', last_response.body
45
+ end
46
+ end
47
+
48
+ context "when going to /failure" do
49
+ should "send an email" do
50
+ Mail.expects(:deliver).with() { |h|
51
+ h[:to] == "me@me.com" &&
52
+ h[:from] == "you@you.com" &&
53
+ h[:subject] == "[FooBar Exception] Failed" &&
54
+ h[:body] =~ /A RuntimeError occured: Failed/
55
+ }
56
+
57
+ get "/failure"
58
+ end
59
+
60
+ should "still respond with the original body" do
61
+ Mail.expects(:deliver)
62
+
63
+ get "/failure"
64
+
65
+ title = /<title>RuntimeError at \/failure<\/title>/
66
+ assert_match(title, last_response.body)
67
+ end
68
+ end
69
+
70
+ context "when posting to /login" do
71
+ should "by default display the results unfiltered" do
72
+ post '/login', :username => "quentin", :password => "test"
73
+
74
+ assert(last_response.body =~ /password=test/)
75
+ end
76
+ end
77
+
78
+ context "when posting to /login in filtered context" do
79
+ def app
80
+ FilteredPassword.new
81
+ end
82
+
83
+ should "filter out password" do
84
+ Mail.expects(:deliver).with() { |hash|
85
+ hash[:body] !~ /password=mypass/ &&
86
+ hash[:body] !~ /"password"=>"mypass"/ &&
87
+ hash[:body] !~ /'password'=>'mypass'/
88
+ }
89
+
90
+ post "/login", :password => "mypass"
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_WITHOUT: ""
@@ -0,0 +1,370 @@
1
+ == Sun Apr 11 07:49:15 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
2
+
3
+ * Lots of updates on encoding and decoding of headers and unstructured fields. This
4
+ is now a lot cleaner and nicer. Also more predictable.
5
+ * Merged encoding branch back into head
6
+ * Version bump to 2.2.0
7
+ * Tagged 2.2.0
8
+
9
+ == Sun Apr 4 06:41:46 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
10
+
11
+ * Created non-ascii header auto encoding for address fields and unstructured fields
12
+ * Changed default behaviour of mail, if you specify a charset, it will use that charset
13
+ regardless of what is in the body. Previously, if the body was all US-ASCII, it would
14
+ set the charset to US-ASCII in preference.
15
+ * Many internal version jumps from 2.1.5.3 => 2.1.5.8 - unreleased development versions
16
+
17
+ == Mon 29 Mar 2010 07:04:34 UTC Mikel Lindsaar <raasdnil@gmail.com>
18
+
19
+ * Version bump to 2.1.5.3
20
+ * No longer depend on vendor'd treetop as treetop now has optional loading of parts of the library
21
+ * Change treetop dependency to 1.4.5
22
+
23
+ == Sun 28 Mar 2010 10:31:33 UTC Mikel Lindsaar <raasdnil@gmail.com>
24
+
25
+ * Version bump to 2.1.5.2
26
+ * Fixed up preserve case in header fields when assigned from a message closes issue #46
27
+
28
+ == Sun 28 Mar 2010 09:02:20 UTC Mikel Lindsaar <raasdnil@gmail.com>
29
+
30
+ * Version bump to 2.1.5.1
31
+ * Fixed net/pop3.rb regression for Ruby 1.8.6
32
+ * Merged in Jeremy Kemper's updates:
33
+ * Bump vendored treetop to 1.4.4
34
+ * Use Mikel's treetop for cucumber workaround
35
+ * Use LOAD_PATH for spec_helper instead of relative requires
36
+ * Force treetop from git so cucumber doesn't pull in old version
37
+
38
+ == Sun Mar 28 07:01:07 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
39
+
40
+ * Version bump to 2.1.5
41
+ * Changed guess encoding to short circuit to binary if the mime type is unknown, should be safe
42
+ * Renaming spec to match the file for attachment_lists.rb
43
+ * Adding Message#decoded returns Message#body#decoded if the message is not multipart
44
+
45
+ == Sun Mar 28 02:55:42 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
46
+
47
+ * Version bump to 2.1.4
48
+
49
+ == Sun Mar 28 00:26:27 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
50
+
51
+ * Merged in Jeremy/treetop to vendored treetop
52
+ * Merged in nathansobo/treetop to vendored treetop
53
+ * Merged in pzbowen/mail into mail - Adds body auto encoding - awesome work
54
+ * Fixed content-transfer-encoding parser to be more compliant per RFC, also now handles trailing semi-colons correctly
55
+ * Fixed content-transfer-encoding parser to handle weird "from the wild" misspellings
56
+ * Added message.errors, header.errors arrays, returns array of [field_name, value, error_object] for each field that failed to parse
57
+ * Removed bundler require from Rakefile
58
+
59
+ == Sun Mar 17 03:03:03 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
60
+
61
+ * Keep header name case when failing to unstructured field
62
+
63
+ == Wed Feb 24 09:14:56 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
64
+
65
+ * Fixed multiaddress bounce messages crashing when calling .bounced? Now just take the first report and return that.
66
+ * Closes issue 38 - final_recipient method give problem when one bounce email for multiple email ids
67
+ * Fixing up TODO and Docs
68
+
69
+ == Sun Mar 22 03:24:15 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
70
+
71
+ * Version bump to 2.1.3
72
+
73
+ == Thu Jan 28 00:25:02 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
74
+
75
+ * Added TMM1's patch to not raise errors if a email is not multipart/report
76
+ * Added html_part and text_part now return the first text/html or text/plain part they find. Order is from top to bottom of the email, all parts, flattened.
77
+ * Cleaning up register_interceptor and register_observer including documentation
78
+ * Renamed #register_for_delivery_notification to #register_observer
79
+ * Renamed #register_for_delivery_interception to #register_interceptor
80
+ * Adding spec to check for folding of non ASCII words that have been encoded
81
+ * Updating Message#inspect to be a bit more friendly... it is for us mere mortals after all
82
+ * Version bump to 2.1.2
83
+
84
+ == Sun Jan 28 02:59:34 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
85
+
86
+ * Removed old method of setting delivery_method
87
+
88
+ == Mon Jan 25 11:36:13 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
89
+
90
+ * Added ability for address fields to init on an array instead of just a string.
91
+ * Version bump to 2.1.1
92
+
93
+ == Mon Jan 25 10:36:33 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
94
+
95
+ * Now passes a block to the delivery handler, which can just call yield if it want's Mail to just do it's normal delivery method
96
+ * Moved Mail.deliveries into Mail::TestMailer.deliveries. Now only gets mail appended to it if you are sending with the :test delivery_method (only for testing)
97
+ * Version bump to 2.1.0
98
+
99
+ == Mon Jan 25 01:44:13 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
100
+
101
+ * Change :deliver! to deliver a mail object, bypassing the :perform_deliveries and :raise_delivery_errors flags, also does not append the mail object to Mail.deliveries, thus the ! (dangerous). The intended use for :deliver! is for people wanting to have their own delivery_handler (like ActionMailer uses) to track and handle delivery failures.
102
+ * Added :delivery_handler to Message. Allows you to pass an object that will be sent :deliver_mail(self) by the Mail::Message instance when it is sent :deliver and bypasses the usual delivery method.
103
+ * Changed :perform_deliveries flag to be more consistent with it's name, mail will not append itself to the Mail.deliveries collection if :perform_deliveries is false
104
+
105
+ == Sat Jan 23 23:49:50 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
106
+
107
+ * Version bump to 2.0.5
108
+ * Added :raise_delivery_errors to Mail::Message, if set to false will silently rescue all errors raised by the delivery methods, set to true by default
109
+
110
+ == Sat Jan 23 23:28:42 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
111
+
112
+ * Version bump to 2.0.4
113
+ * Added :perform_deliveries to mail, will not actually call deliver on the delivery method if this is set to false, set to true by default.
114
+ * Added @delivery_notification_observers to mail messages, you can register an observer with mail by calling mail.register_for_delivery_notification(observer) and then when mail is told to :deliver it will call your observer with observer.delivered_email(self). It will call your observer if it actually performed the delivery or not (that is, irregardless of the :perform_deliveries flag)
115
+ * Added ability to overwrite the Mail.deliveries store with an object of your choice instead of just an array, this is a good way to find out if something actually got delivered as if :perform_deliveries is false, this collection will not get the mail message appended
116
+
117
+ == Sat Jan 23 05:32:53 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
118
+
119
+ * Version bump to 2.0.3
120
+ * Made body.sort_parts! recursive, to do the entire body
121
+ * Added ability to use << on the results returned by the various address fields, ie, mail.to << 'new@address' now works
122
+ * Message now adds multipart/mixed as the content type if nothing is set and there are parts to the message
123
+ * Added #display_names and #addrs to all address fields. #addrs returns the actual Mail::Address object for each address in the field.
124
+ * Body should call to_s on given input... incase someone gave it an IO.readlines result (Array)
125
+ *
126
+
127
+ == Thu Jan 21 05:27:17 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
128
+
129
+ * Version bump to 2.0.2
130
+ * Major change to attachments, add_file now only accepts
131
+ {:filename => 'full/path/to/file.png'} or
132
+ {:filename => 'file.png', :content => 'string of file content'}
133
+ you can also now do mail.attachments['filename.png'] = File.read('path/to/file.png')
134
+ which is nice too!
135
+
136
+ == Fri Jan 15 09:20:51 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
137
+
138
+ * Rewrote all network classes to not use singletons. Means different Mail::Message objects can have different delivery methods.
139
+ * Added examples for how to send via GMail, MobileMe, Sendmail, File etc.
140
+ * Version bump to 2.0.0 as Network API changed drastically, now not a singleton class.
141
+ * Fixed that return-path should only return one address
142
+
143
+ == Thu Jan 14 10:41:22 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
144
+
145
+ * Version update to 1.6.0 - API change on mail.address_fields to always return arrays
146
+ * Updated all message.address_field methods to always return arrays, so mail.from #=> ['one@address.com'] now, is least surprise
147
+ * Updated handling of empty group lists so it didn't crash
148
+
149
+ == Thu Jan 12 10:41:47 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
150
+
151
+ * Version 1.5.3, handling invalid input on fields. Highly recommended update
152
+ * Updated fields to always try parsing the given data (unless blank). This allows mail to catch invalid input and return UnstructuredFields. Makes mail a lot more resistant to invalid input.
153
+
154
+ == Fri 8 Jan 2010 00:00:08 UTC Mikel Lindsaar <raasdnil@gmail.com>
155
+
156
+ * Version bump to 1.5.2
157
+
158
+ == Fri 8 Jan 8:55:49 2010 +1100 Mikel Lindsaar <raasdnil@gmail.com>
159
+
160
+ * Updated Sendmail and SMTP delivery methods to use return-path if present
161
+ * Fix up a lot of content-type parsing problems
162
+ * Updating compat listing
163
+ * Moving error emails into one directory
164
+ * Moving error emails into one directory
165
+ * Initializing @tls variable to remove warnings
166
+ * Moved default corpus directory
167
+ * Fixed up git ignore file
168
+
169
+ == Thu 6 Jan 2010 23:59:29 UTC Mikel Lindsaar <raasdnil@gmail.com>
170
+
171
+ * Added compatibility list to Readme.rdoc
172
+ * Fixing encoding of return path to be per RFC 2822, adding angle brackets around the addr_spec
173
+ * Specs covering return path setting and preserving
174
+
175
+ == Thu 5 Jan 2010 23:59:48 UTC Mikel Lindsaar <raasdnil@gmail.com>
176
+
177
+ * Moving the require for tlsmail for Ruby 1.8.6 into mail.rb
178
+
179
+ == Sun Jan 3 00:08:06 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
180
+
181
+ * Version bump to 1.5.0
182
+
183
+ * Major API change in Message#field_name. This WILL break your applications that use Mail. Message#field_name now returns good, intelligent, default values. You can still access the field object by calling Message#[:field_name] or Message#['field_name'].
184
+
185
+ == Sat Jan 2 04:12:53 UTC 2010 Mikel Lindsaar <raasdnil@gmail.com>
186
+
187
+ * Message-ID, Content-ID, References et al, now return the default value of the message ID without the angle brackets, as per RFC 2822, "Semantically, the angle bracket characters are not part of the msg-id; the msg-id is what is contained between the two angle bracket characters."
188
+
189
+ * Message class now has getter and setter methods for all the supported field types explicitly. This allows us to return a "default" value for all fields.
190
+
191
+ * All address fields, when called from Message#to or Message#from or the like, return either a string of the address spec (mikel@test.lindsaar.net) if it is a single entry, or an array of address specs if there is more than one ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net']
192
+
193
+ == Mon 28 Dec 2009 01:21:52 UTC Mikel Lindsaar <raasdnil@gmail.com>
194
+
195
+ * Added sorting of parts, default is text/plain, then text/enriched and text/html. Access through Body#set_sort_order and Body#sort_parts! (called from Body#encode automatically)
196
+ * Version bump to 1.4.2
197
+
198
+ == Sun Dec 27 10:38:24 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
199
+
200
+ * Updating treetop and mail to initialize uninitialized instance variables to
201
+ nil
202
+ * Version bump to 1.4.1
203
+
204
+ == Sun Dec 27 09:51:27 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
205
+
206
+ * Version bump to 1.4 because now :to_s calls :decoded for all fields and body
207
+ while :to_s calls :encoded for Message and Header containers. Makes sense...
208
+ really.
209
+
210
+ == Sun Dec 27 07:30:02 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
211
+
212
+ * Changed fields to default to :decoded on :to_s, all container objects
213
+ retain :encoded as the default for :to_s
214
+
215
+ == Thu Dec 17 06:35:05 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
216
+
217
+ * Fixed parsing error 'Subject: =?ISO-8859-1?Q?Re=3A_ol=E1?=' (has a new line embedded)
218
+
219
+ == Thu Dec 17 02:14:23 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
220
+
221
+ * Version 1.3.4
222
+ * Vendor'd treetop
223
+
224
+ == Thu Dec 17 01:32:00 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
225
+
226
+ * Version 1.3.3
227
+ * Removed dependency on treetop, don't need it at runtime
228
+
229
+ == Wed Dec 16 23:48:46 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
230
+
231
+ * Version 1.3.2
232
+ * Resolved Ruby 1.9.1-head not working because File.basename only accepts US-ASCII or 8Bit
233
+
234
+ == Sun Dec 13 01:06:17 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
235
+
236
+ * Version 1.3.1
237
+ * Resolved Issue #18 - Wrong instance variable name
238
+ * Resolved Issue #15 - Duplicate block call
239
+
240
+ == Thu Dec 10 21:25:37 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
241
+
242
+ * Resolved Issue #13 - replacing From field results in from field becoming optional field.
243
+
244
+ == Thu 3 Dec 2009 00:52:12 UTC Mikel Lindsaar <raasdnil@gmail.com>
245
+
246
+ * Added POP upgrades from Nicolas Fouché
247
+ * Added patch to handle multiple from lines in email from Luke Grimstrup
248
+
249
+ == Mon Nov 23 23:34:22 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
250
+
251
+ * Resolved Issue #12 - Wrong comment in smtp.rb
252
+
253
+ == Mon Nov 23 22:35:50 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
254
+
255
+ * Changed the way attachments are added so that it does not break depending on the order of the Hash passed in.
256
+ * Version bump to 1.3.0 - Now works with Edge ActionMailer, MRI 1.8.6, 1.8.7, 1.9.1, all tests passing
257
+
258
+ == Sun Nov 22 12:19:44 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
259
+
260
+ * Added check on add_part to make sure if there is already a body, and if so, make a text_part of the body
261
+ * Fixing up attachment adding and making sure multipart emails always have boundaries
262
+ * Change Message#attachments to now recursively return all attachments in the email in an ordered flattened array
263
+ * Added ability for Mail::Message to accept {:headers => {'custom-header' => 'value', 'another-custom-header' => 'value'}} as a param on init
264
+ * Adding ability to Mail::Message to add a part via :part(params) with optional block
265
+ * Fixed up QP encoding forcing underscores into everything with a space
266
+ * Added ReturnPathField#address
267
+ * Updating gem loads and active support loads
268
+
269
+ == Sat Nov 21 12:52:46 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
270
+
271
+ * Changed Mail::Encodings to clean it up, added in unquote_and_convert_to as well as refactor in this area
272
+
273
+ == Thu Nov 19 04:16:10 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
274
+
275
+ * Added sendmail support from (Simon Rozet)
276
+ * Changed to bundler for gem dependancies and moved gem generation into rakefile (Simon Rozet)
277
+ * Bumped to 1.2.6 for sendmail support
278
+
279
+ == Wed Nov 18 04:26:21 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
280
+
281
+ * Changed Encodings.param_encode(string) so it intelligently encodes and quotes needed
282
+ items and leaves plain, no special char, US-ASCII alone unquoted.
283
+
284
+ == Sat Nov 14 08:20:21 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
285
+
286
+ * Resolved Issue #10 - empty/nil cc/bcc field causes exception (Mail::Field::ParseError)
287
+
288
+ == Fri Nov 13 00:31:04 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
289
+
290
+ * Hacked and mutilated the network section, made it easier to extend out with other
291
+ delivery and retriever methods. API changed SLIGHTLY with this. Please check the
292
+ readme
293
+ * Resolved Issue #8 - Mail::SMTP now delivers to all mail.destinations
294
+ * Version bump to 1.2.5
295
+
296
+ == Thu Nov 12 02:58:01 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
297
+
298
+ * Resolved Issue #5 - Message ID not handling multiple periods in left hand side
299
+ * Resolved Issue #6 - Ordering of add_file and body items causes invalid emails
300
+
301
+ == Tue Nov 10 08:15:14 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
302
+
303
+ * Resolved Issue #5 - Message ID generation issue
304
+ * Resolved Issue #7 - README add_file examples don't seem to work - Updated readme and
305
+ rdoc in Message#add_file
306
+
307
+ == Mon Nov 9 23:38:33 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
308
+
309
+ * Added ability to create new email via a hash or hash-like object. <mikel>
310
+ * Moved all of the Part init into the Message class. Part now just uses Message's init,
311
+ also moved all the attachment related functions into Message. As Part is a subclass
312
+ of message, you shouldn't see any interface changes here.
313
+
314
+ == Fri Nov 6 22:52:10 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
315
+
316
+ * a6ef2b4: Fixed Issue #4 - Can't call encoding on non existant
317
+ content-transer-encoding header
318
+
319
+ == Fri Nov 6 00:51:55 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
320
+
321
+ * Handled unstructured field folding "blank" lines
322
+ * Fixed error in header.rb that created fields into an array, instead of a FieldList, resulting
323
+ in mail.encode returning a random sort order on the header.
324
+ * Made unstructured fields attempt to decode their values on :decode
325
+
326
+ == Thu Nov 5 04:45:31 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
327
+
328
+ * 2acb70a: Closes Issue #1 - Handling badly formatted content-type fields <mikel>
329
+
330
+ == Wed Nov 4 23:24:32 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
331
+
332
+ * 2b5d608: Closes Issue #2 - Empty header field values not parsing <mikel>
333
+ * Version bumb to 1.2.1
334
+
335
+ == Wed Nov 4 12:54:43 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
336
+
337
+ * Renamed Mail::Message.encode! to Mail::Message.ready_to_send!, deprecated :encode! <mikel>
338
+ * Rewrote encoding and decoding methods on all classes. Adds a lot of boiler plate code, but allows us to
339
+ be really precise in each field type that needs custom encoding. Now all encoding is done by the field_type
340
+ itself. Need to follow through on the body. <mikel>
341
+ * Bump version to 1.2.0 due to changes of :encoded, :decoded behaviour <mikel>
342
+
343
+ == Tue Nov 3 00:59:45 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
344
+
345
+ * Tested mail against entire Enron set (2.3gb) and the Trec 2005 set (0.5gb), ~ half a million emails without crashing <jlindley>
346
+ * Some headers only can appear once, enforce during header parse assignment. <jlindley>
347
+ * Convert empty bodies into empty arrays instead of nil. <jlindley>
348
+ * Handle blank content dispositions. <jlindley>
349
+ * Mention Trec 2005 Spam Corpus in readme <jlindley>
350
+ * Add 'rake corpus:verify_all' to allow parse checks in bulk. <jlindley>
351
+ * Added handling of multi value parameters, like filename*1*="us-ascii'en'blah" filename*2="bleh" <mikel>
352
+ * Added dependency on ActiveSupport 2.3 or higher <mikel>
353
+
354
+ == Sun Nov 1 12:00:00 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
355
+
356
+ * handle OpenSSL::SSL::VERIFY_NONE returning 0 <jlindley>
357
+ * doing Mail.new { content_type [text, plain, { charset => UTF-8 }] } is now
358
+ possible (content type accepts an array) <mikel>
359
+
360
+ == Sat Oct 31 11:00:41 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
361
+
362
+ * Fixed attachment handling, so mail can find attachment from a content-type,
363
+ content-disposition or content-location
364
+ * Added content-location field and parser
365
+ * Added message.has_attachments? for ActionMailer friendliness
366
+ * Added attachment.original_filename for ActionMailer friendliness
367
+
368
+ == Sat Oct 25 13:38:01 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
369
+
370
+ * Birthday, Mail released as a gem... phew