{"id":588,"date":"2011-01-25T12:27:46","date_gmt":"2011-01-25T03:27:46","guid":{"rendered":"http:\/\/blog.t-szk.com\/?p=588"},"modified":"2011-01-25T12:40:17","modified_gmt":"2011-01-25T03:40:17","slug":"movable-type%e3%82%a8%e3%83%b3%e3%83%88%e3%83%aa%e3%83%bc%e3%81%8c%e4%bf%9d%e5%ad%98%e3%81%95%e3%82%8c%e3%81%9f%e3%82%89%e6%8c%87%e5%ae%9a%e3%81%ae%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%a2%e3%83%89","status":"publish","type":"post","link":"https:\/\/codaholic.org\/?p=588","title":{"rendered":"[Movable Type]\u30a8\u30f3\u30c8\u30ea\u30fc\u304c\u4fdd\u5b58\u3055\u308c\u305f\u3089\u6307\u5b9a\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30d7\u30e9\u30b0\u30a4\u30f3"},"content":{"rendered":"<p>\u30d6\u30ed\u30b0\u8a18\u4e8b\u304c\u4fdd\u5b58\u3055\u308c\u305f\u4e88\u3081\u6307\u5b9a\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u30e1\u30fc\u30eb\u304c\u9001\u4fe1\u3055\u308c\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u3059\u3002\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u52d5\u4f5c\u78ba\u8a8d\u7528\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u305f\u3081\u3001\u5b9f\u7528\u6027\u306f\u7686\u7121\u3067\u3059\u304c\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u52d5\u4f5c\u306e\u7406\u89e3\u306e\u4e00\u52a9\u3068\u306a\u308a\u307e\u3057\u305f\u306e\u3067\u63b2\u8f09\u3057\u307e\u3059\u3002<br \/>\n<!--more--><br \/>\n<br \/>\n\u30dd\u30a4\u30f3\u30c8\u3068\u306a\u308b\u7b87\u6240\u306f\u300c<span style=\"color:red;font-weight:bold;\">\u30a8\u30f3\u30c8\u30ea\u30fc\u304c\u4fdd\u5b58\u3055\u308c\u305f\u3089<\/span>\u4f55\u304b\u3059\u308b\u300d\u3068\u3044\u3046\u52d5\u4f5c\u3092\u3057\u305f\u3044\u5834\u5408\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u3044\u3044\u306e\u304b\u3068\u3044\u3046\u3068\u3053\u308d\u3067\u3059\u3002\u3053\u306e\u52d5\u4f5c\u3092\u3055\u305b\u308b\u305f\u3081\u306b\u4ed6\u306e\u65b9\u304c\u4f5c\u3063\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u53c2\u8003\u306b\u3055\u305b\u3066\u9802\u3044\u305f\u308a\u3001\u30d6\u30ed\u30b0\u8a18\u4e8b\u3092\u63a2\u3057\u56de\u308a\u307e\u3057\u305f\u304c\u3084\u3063\u3068\u898b\u3064\u3051\u307e\u3057\u305f\u3002\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u90e8\u5206\u306f\u304a\u307e\u3051\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>[perl]<br \/>\npackage MT::Plugin::TestMailSender;<\/p>\n<p>use base qw(MT::Plugin);<br \/>\nmy $plugin = new MT::Plugin({<br \/>\n\tname => &#8216;TestMailSender&#8217;,<br \/>\n\tversion => &#8216;1.0.0&#8217;,<br \/>\n\tregistry => {<br \/>\n\t\tcallbacks => {<br \/>\n\t\t\t&#8216;cms_post_save.entry&#8217; => \\&#038;test_mail_send<br \/>\n\t\t}<br \/>\n\t}<br \/>\n});<br \/>\nMT->add_plugin($plugin);<\/p>\n<p>sub test_mail_send{<br \/>\n\tuse MT::Mail;<br \/>\n\tmy %head = (To => &#8216;mailaddress1@example.com&#8217; , Subject => &#8216;hoge&#8217;);<br \/>\n\tmy $body = &#8216;dore&#8217;;<br \/>\n\tMT::Mail->send(\\%head,$body);<br \/>\n}<br \/>\n[\/perl]<\/p>\n<p>\u305d\u306e\u300c<span style=\"color:red;font-weight:bold;\">\u30a8\u30f3\u30c8\u30ea\u30fc\u304c\u4fdd\u5b58\u3055\u308c\u305f\u3089<\/span>\u4f55\u304b\u3059\u308b\u300d\u3068\u3044\u3046\u52d5\u4f5c\u306f\u30017-11\u884c\u76ee\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5185\u5bb9\u306f\u30a8\u30f3\u30c8\u30ea\u30fc\u304c\u4fdd\u5b58\u3055\u308c\u305f\u3089\u3001\u6307\u5b9a\u3057\u305f\u30b5\u30d6\u30eb\u30fc\u30c1\u30f3\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u30b5\u30d6\u30eb\u30fc\u30c1\u30f3\u306etest_mail_send\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u30a8\u30f3\u30c8\u30ea\u30fc\u304c\u4fdd\u5b58\u3055\u308c\u305f\u3089\u3001\u30bf\u30a4\u30c8\u30ebhoge\u3001\u672c\u6587dore\u3068\u66f8\u304b\u308c\u305f\u30e1\u30fc\u30eb\u304c\u6307\u5b9a\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u306f\u3001\u300c<span style=\"color:red;font-weight:bold;\">\u30a8\u30f3\u30c8\u30ea\u30fc\u304c\u4fdd\u5b58\u3055\u308c\u305f\u3089<\/span>\u300d\u3068\u3044\u3046\u52d5\u4f5c\u3092\u8868\u3057\u3066\u3044\u308b\u306e\u304c9\u884c\u76ee\u306ecms_post_save.entry\u306b\u306a\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u306b\u306f\u4ed6\u306b\u3082\u7a2e\u985e\u304c\u3042\u308a\u300c\u3007\u3007\u3057\u305f\u3089\u300d\u3068\u3044\u3046\u52d5\u4f5c\u306b\u5408\u308f\u305b\u3066\u5909\u66f4\u3001\u8ffd\u52a0\u3092\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u5b9a\u7fa9\u3067\u304d\u308b\u52d5\u4f5c\u306e\u4e00\u89a7\u306b\u3064\u3044\u3066\u306f\u3001\u65e5\u672c\u8a9e\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u898b\u5f53\u305f\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u82f1\u8a9e\u306e\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3057\u304b\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u53c2\u8003<br \/>\n<a href=\"http:\/\/www.movabletype.org\/documentation\/developer\/callbacks\/\" target=\"_blank\">http:\/\/www.movabletype.org\/documentation\/developer\/callbacks\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d6\u30ed\u30b0\u8a18\u4e8b\u304c\u4fdd\u5b58\u3055\u308c\u305f\u4e88\u3081\u6307\u5b9a\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u30e1\u30fc\u30eb\u304c\u9001\u4fe1\u3055\u308c\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u3059\u3002\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u52d5\u4f5c\u78ba\u8a8d\u7528\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u305f\u3081\u3001\u5b9f\u7528\u6027\u306f\u7686\u7121\u3067\u3059\u304c\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u52d5\u4f5c\u306e\u7406\u89e3\u306e\u4e00\u52a9\u3068\u306a\u308a\u307e\u3057\u305f\u306e\u3067\u63b2\u8f09\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[10],"tags":[249,110,109],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8gd1W-9u","_links":{"self":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/588"}],"collection":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=588"}],"version-history":[{"count":9,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/588\/revisions"}],"predecessor-version":[{"id":594,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/588\/revisions\/594"}],"wp:attachment":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}