メールに添付

ついでに普通に添付した場合はどうなるのかと言うと、

メールの添付ファイルについて
http://www.kisc.meiji.ac.jp/~wsd/faq/faq_creation/faq_cre_attach.htm
こちらにサンプルあり。

MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/mixed; boundary="boundary"
X-UIDL: 9fec2920cb11ede99e2fcbc1f9ab0ad6
Status: RO

    • boundary

Content-Type: text/plain; charset="ISO-2022-JP"
本文

    • boundary

Content-Type: application/octet-stream; name="添付ファイル.xls"
Content-Disposition: attachment; filename="添付ファイル.xls"
Content-Transfer-Encoding: base64
MIMEエンコードされた添付ファイル


Freeware and Other Utilities by Funduc Software
http://www.funduc.com/otsoft.htm#decodeshellextension
そしてデコード前のファイルを適切にデコードするにはこんなプログラムも使えるかと。但しEudoraとEdmaxは勝手にデコードして格納する為使えない。