{"id":4441,"date":"2014-05-21T10:38:44","date_gmt":"2014-05-21T01:38:44","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=4441"},"modified":"2014-05-21T10:38:44","modified_gmt":"2014-05-21T01:38:44","slug":"google-apps-script%e5%88%a5%e3%81%ae%e3%82%a2%e3%83%89%e3%83%ac%e3%82%b9%e3%81%8b%e3%82%89%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e4%bf%a1%e3%81%99%e3%82%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=4441","title":{"rendered":"[Google Apps Script]\u5225\u306e\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3002"},"content":{"rendered":"<p>Google Apps Script\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b<span style=\"color: #ff0000; font-weight: bold;\">GmailApp.sendEmail<\/span>\u30e1\u30bd\u30c3\u30c9\u3001<a href=\"https:\/\/developers.google.com\/apps-script\/reference\/gmail\/gmail-app#sendEmail%28String,String,String,Object%29\" title=\"Class GmailApp - Google Apps Script ? Google Developers\" target=\"_blank\">\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u3092\u898b\u308b\u3068<span style=\"color: #ff0000; font-weight: bold;\">options<\/span>\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3067\u300c<span style=\"color: #ff0000; font-weight: bold;\">from<\/span>\u300d\u304c\u6307\u5b9a\u3067\u304d\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u3001\u65e9\u901f\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">function myFunction() {\r\n  var file = DriveApp.getFileById('AB-CDEFG01234567890123456789');\r\n  GmailApp.sendEmail('to@ka-net.org', \r\n                     '\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb', \r\n                     '\u672c\u6587\u30c6\u30b9\u30c8', \r\n                     {\r\n                       attachments: &#x5B;file.getAs(MimeType.PDF)],\r\n                       bcc: 'bcc@ka-net.org', \r\n                       cc: 'cc@ka-net.org', \r\n                       from: 'gas@ka-net.org', \r\n                       name: '\u5dee\u51fa\u4eba'\r\n                     });\r\n}<\/pre>\n<p>\u3068\u3053\u308d\u304c\u4e0a\u8a18\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001<span style=\"color: #ff0000; font-weight: bold;\">from<\/span>\u306e\u90e8\u5206\u3067\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u7121\u52b9\u306a\u5f15\u6570: gas@ka-net.org<\/span>\u300d\u3068\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067<a href=\"https:\/\/developers.google.com\/apps-script\/reference\/gmail\/gmail-app#sendEmail%28String,String,String,Object%29\" title=\"Class GmailApp - Google Apps Script ? Google Developers\" target=\"_blank\">\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u3092\u3082\u3046\u4e00\u5ea6\u3088\u304f\u898b\u3066\u307f\u308b\u3068\u3001from\u306e\u8aac\u660e\u306b<\/p>\n<blockquote><p>the address that the email should be sent from, which must be one of the values returned by getAliases()<\/p><\/blockquote>\n<p>GmailApp.getAliases\u30e1\u30bd\u30c3\u30c9\u3001Gmail\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u8a2d\u5b9a\u3055\u308c\u305f\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u53d6\u5f97\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u3092\u4f7f\u3046\u3001\u3068\u306e\u8a18\u8f09\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u8981\u3059\u308b\u306b\u3001\u4e8b\u524d\u306bGmail\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u30a8\u30a4\u30ea\u30a2\u30b9(\u5225\u540d\u30a2\u30c9\u30ec\u30b9)\u3092\u8a2d\u5b9a\u3057\u3066\u304a\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u304b\u3063\u305f\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u65e9\u901f\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\u8a2d\u5b9a\u624b\u9806\u306f\u300c<a href=\"https:\/\/support.google.com\/mail\/answer\/22370?hl=ja\" title=\"\u5225\u306e\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b - Gmail \u30d8\u30eb\u30d7\" target=\"_blank\">\u5225\u306e\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b<\/a>\u300d\u306b\u3042\u308b\u901a\u308a\u3001Gmail\u306e\u8a2d\u5b9a\u753b\u9762\u304b\u3089\u7c21\u5358\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_01.jpg\" alt=\"GoogleAppsScript_15_01\" width=\"857\" height=\"580\" class=\"alignnone size-full wp-image-4442\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_01.jpg 857w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_01-300x203.jpg 300w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_02.jpg\" alt=\"GoogleAppsScript_15_02\" width=\"636\" height=\"574\" class=\"alignnone size-full wp-image-4443\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_02.jpg 636w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_02-300x270.jpg 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_03.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_03.jpg\" alt=\"GoogleAppsScript_15_03\" width=\"636\" height=\"574\" class=\"alignnone size-full wp-image-4444\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_03.jpg 636w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_03-300x270.jpg 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_04.jpg\" alt=\"GoogleAppsScript_15_04\" width=\"636\" height=\"574\" class=\"alignnone size-full wp-image-4445\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_04.jpg 636w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_04-300x270.jpg 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_05.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_05.jpg\" alt=\"GoogleAppsScript_15_05\" width=\"636\" height=\"574\" class=\"alignnone size-full wp-image-4446\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_05.jpg 636w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_05-300x270.jpg 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_06.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_06.jpg\" alt=\"GoogleAppsScript_15_06\" width=\"857\" height=\"575\" class=\"alignnone size-full wp-image-4447\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_06.jpg 857w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_06-300x201.jpg 300w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/a><\/p>\n<p>\u30a8\u30a4\u30ea\u30a2\u30b9\u8a2d\u5b9a\u5f8c\u3001\u518d\u5ea6\u4e0a\u8a18\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u305f\u3068\u3053\u308d\u3001\u4eca\u5ea6\u306f\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u306a\u304f\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_07.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_07.jpg\" alt=\"GoogleAppsScript_15_07\" width=\"555\" height=\"534\" class=\"alignnone size-full wp-image-4448\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_07.jpg 555w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_15_07-300x288.jpg 300w\" sizes=\"auto, (max-width: 555px) 100vw, 555px\" \/><\/a><\/p>\n<p>\u53d7\u4fe1\u3057\u305f\u30e1\u30fc\u30eb\u3082\u5dee\u51fa\u4eba\u304c\u3061\u3083\u3093\u3068from\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305f\u30a2\u30c9\u30ec\u30b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<span style=\"color: #ff0000; font-weight: bold;\">Gmail\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u8a2d\u5b9a\u3059\u308b<\/span>\u3001\u3068\u3044\u3046\u4e00\u624b\u9593\u306f\u639b\u304b\u308a\u307e\u3059\u304c\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u9001\u4fe1\u3059\u308b\u30e1\u30fc\u30eb\u3067from\u3092\u81ea\u7531\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u306e\u306f\u3068\u3066\u3082\u4fbf\u5229\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Google Apps Script\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308bGmailApp.sendEmail\u30e1\u30bd\u30c3\u30c9\u3001\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u898b\u308b\u3068options\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3067\u300cfrom\u300d\u304c\u6307\u5b9a\u3067\u304d\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u3001\u65e9\u901f\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002 func [&hellip;]","protected":false},"author":1,"featured_media":7113,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[126],"tags":[],"class_list":["post-4441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Google.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-19D","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4441"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4441\/revisions"}],"predecessor-version":[{"id":4449,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4441\/revisions\/4449"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7113"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}