Skip to content

rust/jpmobile-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jpmobile-rails: Japanese mobile mail plugin for jpmobile on Rails

jpmobile-mailとは

携帯電話宛にメールを送信するためのjpmobile用のプラグインです。主に下記の機能を備えています。

  • 文字コード変換機能/絵文字の変換機能

  • ActionMailerビューの自動振り分け

  • メールの受信機能(テスト版)

  • PC宛てメールの漢字コード変換機能

動作にはjpmobile(github.com/darashi/jpmobile)が必要となります。

インストール

開発版:

% ./script/plugin install git://github.com/rust/jpmobile-mail.git

使用例

ActionMailerビューの自動振り分け

docomo 携帯電話からアクセスした場合、

  • index_mobile_docomo.html.erb

  • index_mobile.html.erb

  • index.html.erb

の順でビューを検索し、最初に見つかったものを使用します。

文字コード変換機能/絵文字の変換機能

実機の送受信に近い形で変換します。

PC宛てメールの漢字コード変換機能

下記の設定を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パッケージ

テストを実行するためには以下のgemパッケージが必要です。

  • rails

  • rack

  • hpricot

  • rspec

  • rspec-rails

  • spec-fixtures

リンク

作者

Copyright 2010 © Shin-ichiro OGAWA, under MIT License.

Shin-ichiro OGAWA <rust@stnard.jp>

stnard.jp

About

Japanese mobile mail plugin for jpmobile

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages