携帯電話宛にメールを送信するためのjpmobile用のプラグインです。主に下記の機能を備えています。
-
文字コード変換機能/絵文字の変換機能
-
ActionMailerビューの自動振り分け
-
メールの受信機能(テスト版)
-
PC宛てメールの漢字コード変換機能
動作にはjpmobile(github.com/darashi/jpmobile)が必要となります。
開発版:
% ./script/plugin install git://github.com/rust/jpmobile-mail.git
docomo 携帯電話からアクセスした場合、
-
index_mobile_docomo.html.erb
-
index_mobile.html.erb
-
index.html.erb
の順でビューを検索し、最初に見つかったものを使用します。
実機の送受信に近い形で変換します。
下記の設定をconfig/initializers/new_rails_defaults.rbなどに追加することにより、携帯電話宛のアドレス以外のメールの本文と題名をISO-2022-JPに変換します。
ActionMailer::Base.pc_convert = true
-
jpmobile 本体のインストールが必要となります。
-
Rails 2.3.5, 2.3.6 のみ動作確認済み。
-
Rails 3.0 が出る頃には別物になっている可能性があります。
-
一部jpmobileのコードを書き換えています。
テストを実行するためには以下のgemパッケージが必要です。
-
rails
-
rack
-
hpricot
-
rspec
-
rspec-rails
-
spec-fixtures
-
jpmobile jpmobile-rails.org
Copyright 2010 © Shin-ichiro OGAWA, under MIT License.
Shin-ichiro OGAWA <rust@stnard.jp>