mail-iso-2022-jp 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +19 -13
- data/lib/mail-iso-2022-jp/patches.rb +4 -0
- metadata +3 -3
data/README.md
CHANGED
@@ -20,25 +20,28 @@ Feature
|
|
20
20
|
|
21
21
|
* (en)
|
22
22
|
|
23
|
-
If you set the `charset` header to `ISO-2022-JP`, the values of `From`, `To`, and `Subject` headers
|
23
|
+
If you set the `charset` header to `ISO-2022-JP`, the values of `From`, `To`, `Cc`, and `Subject` headers
|
24
24
|
and the text of body will be automatically converted to `ISO-2022-JP` by `NKF` module.
|
25
25
|
|
26
26
|
When the `charset` header has other values, this patch has no effect.
|
27
27
|
|
28
28
|
* (ja)
|
29
29
|
|
30
|
-
chasetヘッダの値が `ISO-2022-JP` である場合、送信者(From)、宛先(To)、件名(Subject)の各ヘッダの値および
|
30
|
+
chasetヘッダの値が `ISO-2022-JP` である場合、送信者(From)、宛先(To)、Cc、件名(Subject)の各ヘッダの値および
|
31
31
|
本文(Body)が`NKF`モジュールによって自動的に `ISO-2022-JP` に変換されます。
|
32
32
|
|
33
|
-
charsetヘッダの値が `ISO-2022-JP`
|
33
|
+
charsetヘッダの値が `ISO-2022-JP` でない場合、このパッチには何の効果もありません。
|
34
34
|
|
35
35
|
|
36
|
-
|
36
|
+
Requirements
|
37
37
|
------------
|
38
38
|
|
39
|
-
###
|
39
|
+
### Ruby ###
|
40
|
+
|
41
|
+
* 1.8.7 or higher
|
42
|
+
|
43
|
+
### Gems ###
|
40
44
|
|
41
|
-
* `ruby` 1.8.7 or higher
|
42
45
|
* `mail` 2.2.5 or higher
|
43
46
|
|
44
47
|
|
@@ -58,13 +61,14 @@ or run this command:
|
|
58
61
|
### Install as a Rails plugin ###
|
59
62
|
|
60
63
|
$ cd RAILS_ROOT
|
61
|
-
$ rails plugin install
|
64
|
+
$ rails plugin install git://github.com/kuroda/mail-iso-2022-jp.git
|
62
65
|
|
63
|
-
###
|
66
|
+
### Usage ###
|
64
67
|
|
65
68
|
mail = Mail.new(:charset => 'ISO-2022-JP') do
|
66
69
|
from '山田太郎 <taro@example.com>'
|
67
70
|
to '佐藤花子 <hanako@example.com>'
|
71
|
+
cc '事務局 <info@example.com>'
|
68
72
|
subject '日本語件名'
|
69
73
|
body '日本語本文'
|
70
74
|
end
|
@@ -82,10 +86,13 @@ or run this command:
|
|
82
86
|
NKF.nkf('-w', mail.body.encoded)
|
83
87
|
=> "日本語本文"
|
84
88
|
|
85
|
-
###
|
89
|
+
### Usage with ActionMailer ###
|
86
90
|
|
87
91
|
class UserMailer < ActionMailer::Base
|
88
|
-
default
|
92
|
+
default :charset => 'ISO-2022-JP',
|
93
|
+
:from => "山田太郎 <bar@example.com>",
|
94
|
+
:cc => '事務局 <info@example.com>'
|
95
|
+
|
89
96
|
def notice
|
90
97
|
mail(:to => '佐藤花子 <foo@example.com>', :subject => '日本語件名') do |format|
|
91
98
|
format.text { render :inline => '日本語本文' }
|
@@ -94,13 +101,12 @@ or run this command:
|
|
94
101
|
end
|
95
102
|
|
96
103
|
|
97
|
-
|
98
104
|
License
|
99
105
|
-------
|
100
106
|
|
101
|
-
(en)
|
107
|
+
(en) `mail-iso-2022-jp` is distributed under the MIT license. ([MIT-LICENSE](https://github.com/kuroda/mail-iso-2022-jp/blob/master/MIT-LICENSE))
|
102
108
|
|
103
|
-
(ja)
|
109
|
+
(ja) `mail-iso-2022-jp` はMITライセンスで配布されています。 ([MIT-LICENSE](https://github.com/kuroda/mail-iso-2022-jp/blob/master/MIT-LICENSE))
|
104
110
|
|
105
111
|
|
106
112
|
Special thanks
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail-iso-2022-jp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kohei MATSUHITA
|