携帯3キャリアのデコメをパースしてみた
docomo、auはデコメール、softbankはアレンジメールと呼ぶらしい。
以下、各キャリアごとのContent-Typeの階層。
■docomo
multipart/mixed
multipart/related
multipart/alternative
text/plain
text/html
image/gif
■au
multipart/mixed
multipart/alternative
text/plain
text/html
image/gif
■SoftBank
multipart/mixed
multipart/mixed
text/plain
text/html
image/gif
見事にバラバラ。
デコメにjpeg画像を添付してみた結果。
■docomo
multipart/mixed
multipart/related
multipart/alternative
text/plain
text/html
image/gif
image/jpeg
■au
デコメには添付できず
■SoftBank
multipart/mixed
multipart/mixed
text/plain
text/html
image/gif
image/jpeg
SoftBankはインライン画像、添付画像が同じ階層にある。
どちらか判断するにはheaderにcontent-idがあるかどうかをチェックする必要がある。
カテゴリー: 日記