{"id":4441,"date":"2018-09-09T21:33:12","date_gmt":"2018-09-09T12:33:12","guid":{"rendered":"http:\/\/tsaitoh.net\/wp\/?p=4441"},"modified":"2018-09-14T19:39:43","modified_gmt":"2018-09-14T10:39:43","slug":"mail-jp","status":"publish","type":"post","link":"https:\/\/tsaitoh.net\/wp\/2018\/09\/09\/mail-jp\/","title":{"rendered":"\u30e1\u30fc\u30eb\u306e\u65e5\u672c\u8a9e\u5316"},"content":{"rendered":"<p>\u81ea\u5b85\u3067\u52d5\u304b\u3057\u3066\u3044\u308b\u69d8\u3005\u306a\u6a5f\u80fd\u3067\u3001\u8b66\u544a\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3082\u591a\u3044\u3051\u3069\u3001\u57fa\u672c\u82f1\u5b57\u3002\u65e5\u672c\u8a9e\u3067\u3082\u6587\u5b57\u30b3\u30fc\u30c9\u304c utf-8 \u306a\u3089\u3001mail \u30b3\u30de\u30f3\u30c9\u3067\u9001\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3051\u3069\u3001\u65e5\u672c\u8a9e\u306e\u5b9a\u756a\u306eJIS\u30b3\u30fc\u30c9\u3067\u9001\u308a\u305f\u3044\u3002\u305d\u3053\u3067\u3001Subject \u3092MIME\u30a8\u30f3\u30b3\u30fc\u30c9\u3001\u672c\u6587\u3092JIS\u30b3\u30fc\u30c9\u3067\u9001\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8a2d\u7f6e\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">#!\/bin\/bash\r\n# \u65e5\u672c\u8a9e\u306e\u30e1\u30fc\u30eb\u3092\u9001\u308b(Subject\u306eMIME\u5316,\u672c\u6587\u306eJIS,Content-Type\u51fa\u529b)\r\n# Usage: mail-jp -s SUBJECT -r FROM TO_ADDR ...\r\nSUBJECT=\"\"\r\nFROM=\"\"\r\nTO=\"\"\r\n( # \u30aa\u30d7\u30b7\u30e7\u30f3(subject,from)\u5f15\u6570\u51e6\u7406\r\n  while [ $# -gt 0 ]; do\r\n    case $1 in\r\n      '-s' )\r\n         SUBJECT=$2\r\n         shift\r\n         ;;\r\n      '-r' )\r\n         FROM=$2\r\n         shift\r\n         ;;\r\n      * )\r\n         # \u30ec\u30b7\u30d3\u306e\u51fa\u529b\r\n         [ -n \"$FROM\" ] &amp;&amp; echo \"From: $FROM\"\r\n         [ -n \"$SUBJECT\" ] \\\r\n             &amp;&amp; echo \"Subject: $SUBJECT\" | \/usr\/bin\/nkf -M\r\n         echo 'Content-Type: text\/plain charset=\"iso-2022-jp\"'\r\n         echo 'Content-Transfer-Encoding: 7bit'\r\n         break\r\n         ;;\r\n    esac\r\n    shift\r\n  done\r\n  # \u5f15\u6570(to:\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9)\r\n  while [ $# -gt 0 ]; do\r\n    echo \"To: $1\"\r\n    shift\r\n  done\r\n  echo \"\"\r\n  # \u672c\u6587\r\n  \/usr\/bin\/nkf -j\r\n) | \/usr\/sbin\/sendmail -t\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u5b85\u3067\u52d5\u304b\u3057\u3066\u3044\u308b\u69d8\u3005\u306a\u6a5f\u80fd\u3067\u3001\u8b66\u544a\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3082\u591a\u3044\u3051\u3069\u3001\u57fa\u672c\u82f1\u5b57\u3002\u65e5\u672c\u8a9e\u3067\u3082\u6587\u5b57\u30b3\u30fc\u30c9\u304c utf-8 \u306a\u3089\u3001mail \u30b3\u30de\u30f3\u30c9\u3067\u9001\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3051\u3069\u3001\u65e5\u672c\u8a9e\u306e\u5b9a\u756a\u306eJIS\u30b3\u30fc\u30c9\u3067\u9001\u308a\u305f\u3044\u3002\u305d\u3053\u3067\u3001Subjec [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,26,3,11],"tags":[177,178],"class_list":["post-4441","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","category-t-saitoh","category-computer","tag-177","tag-178"],"_links":{"self":[{"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/posts\/4441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/comments?post=4441"}],"version-history":[{"count":0,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/posts\/4441\/revisions"}],"wp:attachment":[{"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/media?parent=4441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/categories?post=4441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/tags?post=4441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}