告発/再審請求

Just another WordPress.com site

メールのサブジェクトを Base64 エンコーディング

leave a comment »

# サブジェクトを Base64 エンコーディング
subject=$(echo -n “${MAIL_SUBJECT}” |
iconv -f UTF-8 -t ISO-2022-JP |
perl -MMIME::Base64 -ne ‘print encode_base64($_)’)

#メールのヘッダ
Subject: =?ISO-2022-JP?B?${subject}?=

Written by 廣野秀樹

2011/04/18 @ 12:49

カテゴリー: Linux

コメントを残す