{"id":2880,"date":"2018-03-16T01:29:02","date_gmt":"2018-03-15T16:29:02","guid":{"rendered":"http:\/\/taitan916.info\/blog\/?p=2880"},"modified":"2024-02-22T13:09:28","modified_gmt":"2024-02-22T04:09:28","slug":"post-2880","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/2880","title":{"rendered":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u74b0\u5883\u3068\u4f5c\u6210\u3059\u308b\u6a5f\u80fd<\/h2>\n<p>Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f2.3.1\u3092\u4f7f\u7528\u3002<\/p>\n<p>\u4f5c\u6210\u3059\u308b\u6a5f\u80fd\u3068\u3057\u3066\u306f\u7279\u5b9a\u306eURL\u306b\u63a5\u7d9a\u3092\u8a66\u3057\u307f\u3066\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\u304c200\u4ee5\u5916\u306e\u5834\u5408\u306f\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3002\u307e\u305f\u305d\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306fCron\u3067\u81ea\u52d5\u5b9f\u884c\u3059\u308b\u3068\u60f3\u5b9a\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u30bd\u30fc\u30b9<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">require 'open-uri'\r\nrequire 'mail'\r\n\r\ndef notification\r\n    mail = Mail.new\r\n\r\n    options = {\r\n        :address =&gt; \"smtp.gmail.com\",\r\n        :port =&gt; 587,\r\n        :domain =&gt; \"smtp.gmail.com\",\r\n        :user_name =&gt; '\u3053\u3053\u306bGmail\u30a2\u30c9\u30ec\u30b9',\r\n        :password =&gt; '\u3053\u3053\u306b\u30d1\u30b9\u30ef\u30fc\u30c9',\r\n        :authentication =&gt; :plain,\r\n        :enable_starttls_auto =&gt; true\r\n    }\r\n    mail.charset = 'utf-8'\r\n    mail.from \"\u9001\u308a\u5143\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\" \r\n    mail.to \"\u9001\u308a\u5148\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\" \r\n    mail.subject \"\u30e1\u30fc\u30eb\u30bf\u30a4\u30c8\u30eb\"\r\n    mail.body \"\u30e1\u30fc\u30eb\u672c\u6587\"\r\n    mail.delivery_method(:smtp, options)\r\n    mail.deliver\r\n\r\nend\r\n\r\nuri = \"\u30c1\u30a7\u30c3\u30af\u3057\u305f\u3044\u30da\u30fc\u30b8\u306eURL\"\r\nbegin\r\n    status = open(uri).status\r\n    if status[0].to_i != 200\r\n        notification\r\n    end\r\nrescue\r\n    notification\r\nend<\/pre>\n<p>1\u884c\u76ee\u306fRuby\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u300copen-uri\u300d\u3068\u3044\u3046\u3082\u306e\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u308b\u3002file_get_contents\u7684\u306a\u3082\u306e\u307f\u305f\u3044\u3002\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306f\u4ee5\u4e0b\u3002<\/p>\n<p><a href=\"https:\/\/docs.ruby-lang.org\/ja\/latest\/library\/open=2duri.html\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.ruby-lang.org\/ja\/latest\/library\/open=2duri.html<\/a><\/p>\n<p>2\u884c\u76ee\u306f\u300cmail\u300d\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306a\u308b\u3002\u305d\u306e\u307e\u307e\u3060\u3051\u3069\u30e1\u30fc\u30eb\u9001\u4fe1\u306b\u95a2\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306a\u308b\u3002\u3053\u3061\u3089\u306e\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306f\u898b\u3064\u304b\u3089\u305a\u3002<\/p>\n<p>\u3042\u3068\u306fURL\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\u304c200\u3058\u3083\u306a\u3044\u3001\u3082\u3057\u304f\u306f\u30a8\u30e9\u30fc\u767a\u751f\u6642\u306f\u300cnotification\u95a2\u6570\u300d\u3092\u547c\u3093\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u3068\u3044\u3046\u5185\u5bb9\u3002<\/p>\n<p>\u95a2\u6570\u306b\u3064\u3044\u3066\u306f\u5b9f\u884c\u524d\u306b\u8a18\u8ff0\u3057\u3066\u304a\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u4f5c\u6210\u6642\u306f\u5b9f\u884c\u5f8c\u306b\u66f8\u3044\u3066\u3044\u305f\u306e\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u74b0\u5883\u306b\u3088\u3063\u3066\u306f\u30e1\u30fc\u30eb\u304c\u53d7\u4fe1\u3067\u304d\u306a\u3044<\/h2>\n<p>\u3053\u308c\u306fRuby\u306f\u95a2\u4fc2\u306a\u304f\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u306e\u554f\u984c\u3060\u3068\u601d\u308f\u308c\u308b\u304c\u3001\u30e1\u30fc\u30eb\u304c\u53d7\u4fe1\u3067\u304d\u305f\u308a\u51fa\u6765\u306a\u304b\u3063\u305f\u308a\u3057\u305f\u3002\u74b0\u5883\u3068\u3057\u3066\u306fsendmail\u3067\u4f55\u3082\u8a2d\u5b9a\u3092\u884c\u308f\u305a\u306b\u8d77\u52d5\u3057\u305f\u3060\u3051\u3002\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u8a2d\u5b9a\u306f\u672a\u3060\u306b\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u306e\u3067\u3001Gmail\u306eSMTP\u30b5\u30fc\u30d0\u3092\u4f7f\u3063\u3066\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\u3092\u7528\u3044\u305f\u3002\u4ee5\u4e0b\u304c\u30bd\u30fc\u30b9\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">require 'open-uri'\r\nrequire 'mail'\r\n\r\ndef notification\r\n    mail = Mail.new\r\n\r\n    options = {\r\n        :address =&gt; \"smtp.gmail.com\",\r\n        :port =&gt; 587,\r\n        :domain =&gt; \"smtp.gmail.com\",\r\n        :user_name =&gt; '\u3053\u3053\u306bGmail\u30a2\u30c9\u30ec\u30b9',\r\n        :password =&gt; '\u3053\u3053\u306b\u30d1\u30b9\u30ef\u30fc\u30c9',\r\n        :authentication =&gt; :plain,\r\n        :enable_starttls_auto =&gt; true\r\n    }\r\n    mail.charset = 'utf-8'\r\n    mail.from \"\u9001\u308a\u5143\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\" \r\n    mail.to \"\u9001\u308a\u5148\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\" \r\n    mail.subject \"\u30e1\u30fc\u30eb\u30bf\u30a4\u30c8\u30eb\"\r\n    mail.body \"\u30e1\u30fc\u30eb\u672c\u6587\"\r\n    mail.delivery_method(:smtp, options)\r\n    mail.deliver\r\n\r\nend\r\n\r\nuri = \"\u30c1\u30a7\u30c3\u30af\u3057\u305f\u3044\u30da\u30fc\u30b8\u306eURL\"\r\nbegin\r\n    status = open(uri).status\r\n    if status[0].to_i != 200\r\n        notification\r\n    end\r\nrescue\r\n    notification\r\nend<\/pre>\n<p>&nbsp;<\/p>\n<h2>Cron\u3067\u5b9f\u884c\u3059\u308b<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">vi \/etc\/crontab\r\n*\/1 * * * * root ruby \/aaa\/bbb\/ccc\/check.rb<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u53c2\u8003<\/h2>\n<p><a href=\"https:\/\/qiita.com\/nyamage\/items\/7145159c9a610f99b5d9\" target=\"_blank\" rel=\"noopener\">https:\/\/qiita.com\/nyamage\/items\/7145159c9a610f99b5d9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRu ... <\/p>\n","protected":false},"author":1,"featured_media":1768,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[42],"tags":[],"class_list":["post-2880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"taitan\"\/>\n\t<meta name=\"keywords\" content=\"ruby\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/taitan916.info\/blog\/archives\/2880\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5 | \u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2\" \/>\n\t\t<meta property=\"og:description\" content=\"Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/taitan916.info\/blog\/archives\/2880\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/taitan916.info\/blog\/wp-content\/uploads\/2014\/07\/rubylogo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/taitan916.info\/blog\/wp-content\/uploads\/2014\/07\/rubylogo.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"256\" \/>\n\t\t<meta property=\"og:image:height\" content=\"256\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2018-03-15T16:29:02+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-02-22T04:09:28+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5 | \u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/taitan916.info\/blog\/wp-content\/uploads\/2014\/07\/rubylogo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#article\",\"name\":\"Ruby\\u3067\\u30b5\\u30a4\\u30c8\\u306e\\u6b7b\\u6d3b\\u7ba1\\u7406\\u3092\\u884c\\u3044Gmail\\u306eSMTP\\u30b5\\u30fc\\u30d0\\u7d4c\\u7531\\u3067\\u901a\\u77e5\\u30e1\\u30fc\\u30eb\\u3092\\u9001\\u308b\\u65b9\\u6cd5 | \\u52c9\\u5f37\\u3057\\u305f\\u3053\\u3068\\u306e\\u30e1\\u30e2\",\"headline\":\"Ruby\\u3067\\u30b5\\u30a4\\u30c8\\u306e\\u6b7b\\u6d3b\\u7ba1\\u7406\\u3092\\u884c\\u3044Gmail\\u306eSMTP\\u30b5\\u30fc\\u30d0\\u7d4c\\u7531\\u3067\\u901a\\u77e5\\u30e1\\u30fc\\u30eb\\u3092\\u9001\\u308b\\u65b9\\u6cd5\",\"author\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/author\\\/taitan916#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/rubylogo.png\",\"width\":256,\"height\":256},\"datePublished\":\"2018-03-16T01:29:02+09:00\",\"dateModified\":\"2024-02-22T13:09:28+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#webpage\"},\"articleSection\":\"Ruby\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog#listItem\",\"position\":1,\"name\":\"\\u30db\\u30fc\\u30e0\",\"item\":\"https:\\\/\\\/taitan916.info\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/category\\\/ruby#listItem\",\"name\":\"Ruby\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/category\\\/ruby#listItem\",\"position\":2,\"name\":\"Ruby\",\"item\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/category\\\/ruby\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#listItem\",\"name\":\"Ruby\\u3067\\u30b5\\u30a4\\u30c8\\u306e\\u6b7b\\u6d3b\\u7ba1\\u7406\\u3092\\u884c\\u3044Gmail\\u306eSMTP\\u30b5\\u30fc\\u30d0\\u7d4c\\u7531\\u3067\\u901a\\u77e5\\u30e1\\u30fc\\u30eb\\u3092\\u9001\\u308b\\u65b9\\u6cd5\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog#listItem\",\"name\":\"\\u30db\\u30fc\\u30e0\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#listItem\",\"position\":3,\"name\":\"Ruby\\u3067\\u30b5\\u30a4\\u30c8\\u306e\\u6b7b\\u6d3b\\u7ba1\\u7406\\u3092\\u884c\\u3044Gmail\\u306eSMTP\\u30b5\\u30fc\\u30d0\\u7d4c\\u7531\\u3067\\u901a\\u77e5\\u30e1\\u30fc\\u30eb\\u3092\\u9001\\u308b\\u65b9\\u6cd5\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/category\\\/ruby#listItem\",\"name\":\"Ruby\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/#person\",\"name\":\"taitan\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/author\\\/taitan916#author\",\"url\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/author\\\/taitan916\",\"name\":\"taitan\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#webpage\",\"url\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880\",\"name\":\"Ruby\\u3067\\u30b5\\u30a4\\u30c8\\u306e\\u6b7b\\u6d3b\\u7ba1\\u7406\\u3092\\u884c\\u3044Gmail\\u306eSMTP\\u30b5\\u30fc\\u30d0\\u7d4c\\u7531\\u3067\\u901a\\u77e5\\u30e1\\u30fc\\u30eb\\u3092\\u9001\\u308b\\u65b9\\u6cd5 | \\u52c9\\u5f37\\u3057\\u305f\\u3053\\u3068\\u306e\\u30e1\\u30e2\",\"description\":\"Ruby\\u306e\\u52c9\\u5f37\\u3067\\u4f55\\u304b\\u30c4\\u30fc\\u30eb\\u3092\\u4f5c\\u308d\\u3046\\u3068\\u8003\\u3048\\u305f\\u3002\\u307e\\u305f\\u3001Rails\\u3068\\u304b\\u306f\\u4f7f\\u308f\\u305a\\u7d20\\u306eRuby\\u3067\\u3001\\u5c1a\\u4e14\\u3064Web\\u30da\\u30fc\\u30b8\\u3068\\u304b\\u306f\\u7528\\u610f\\u305b\\u305a\\u306b\\u30b3\\u30de\\u30f3\\u30c9\\u30e9\\u30a4\\u30f3\\u304b\\u3089\\u306e\\u307f\\u4f7f\\u7528\\u30c4\\u30fc\\u30eb\\u3092\\u4f5c\\u3063\\u3066\\u307f\\u305f\\u304b\\u3063\\u305f\\u3002\\u30b5\\u30a4\\u30c8\\u306e\\u6b7b\\u6d3b\\u7ba1\\u7406\\u30c4\\u30fc\\u30eb\\u3068\\u304b\\u826f\\u3055\\u3052\\u3060\\u3068\\u601d\\u3063\\u305f\\u306e\\u3067\\u30e1\\u30e2\\u3002\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/author\\\/taitan916#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/author\\\/taitan916#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/rubylogo.png\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880\\\/#mainImage\",\"width\":256,\"height\":256},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/archives\\\/2880#mainImage\"},\"datePublished\":\"2018-03-16T01:29:02+09:00\",\"dateModified\":\"2024-02-22T13:09:28+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/\",\"name\":\"\\u52c9\\u5f37\\u3057\\u305f\\u3053\\u3068\\u306e\\u30e1\\u30e2\",\"description\":\"Web\\u30a8\\u30f3\\u30b8\\u30cb\\u30a2 \\\/ \\u30d7\\u30ed\\u30b0\\u30e9\\u30de\\u304c\\u52c9\\u5f37\\u3057\\u305f\\u3053\\u3068\\u306e\\u30e1\\u30e2\\u3002\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/taitan916.info\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5 | \u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2","description":"Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002","canonical_url":"https:\/\/taitan916.info\/blog\/archives\/2880","robots":"max-image-preview:large","keywords":"ruby","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/taitan916.info\/blog\/archives\/2880#article","name":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5 | \u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2","headline":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5","author":{"@id":"https:\/\/taitan916.info\/blog\/archives\/author\/taitan916#author"},"publisher":{"@id":"https:\/\/taitan916.info\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/taitan916.info\/blog\/wp-content\/uploads\/2014\/07\/rubylogo.png","width":256,"height":256},"datePublished":"2018-03-16T01:29:02+09:00","dateModified":"2024-02-22T13:09:28+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/taitan916.info\/blog\/archives\/2880#webpage"},"isPartOf":{"@id":"https:\/\/taitan916.info\/blog\/archives\/2880#webpage"},"articleSection":"Ruby"},{"@type":"BreadcrumbList","@id":"https:\/\/taitan916.info\/blog\/archives\/2880#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/taitan916.info\/blog#listItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/taitan916.info\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/taitan916.info\/blog\/archives\/category\/ruby#listItem","name":"Ruby"}},{"@type":"ListItem","@id":"https:\/\/taitan916.info\/blog\/archives\/category\/ruby#listItem","position":2,"name":"Ruby","item":"https:\/\/taitan916.info\/blog\/archives\/category\/ruby","nextItem":{"@type":"ListItem","@id":"https:\/\/taitan916.info\/blog\/archives\/2880#listItem","name":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5"},"previousItem":{"@type":"ListItem","@id":"https:\/\/taitan916.info\/blog#listItem","name":"\u30db\u30fc\u30e0"}},{"@type":"ListItem","@id":"https:\/\/taitan916.info\/blog\/archives\/2880#listItem","position":3,"name":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5","previousItem":{"@type":"ListItem","@id":"https:\/\/taitan916.info\/blog\/archives\/category\/ruby#listItem","name":"Ruby"}}]},{"@type":"Person","@id":"https:\/\/taitan916.info\/blog\/#person","name":"taitan"},{"@type":"Person","@id":"https:\/\/taitan916.info\/blog\/archives\/author\/taitan916#author","url":"https:\/\/taitan916.info\/blog\/archives\/author\/taitan916","name":"taitan"},{"@type":"WebPage","@id":"https:\/\/taitan916.info\/blog\/archives\/2880#webpage","url":"https:\/\/taitan916.info\/blog\/archives\/2880","name":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5 | \u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2","description":"Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002","inLanguage":"ja","isPartOf":{"@id":"https:\/\/taitan916.info\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/taitan916.info\/blog\/archives\/2880#breadcrumblist"},"author":{"@id":"https:\/\/taitan916.info\/blog\/archives\/author\/taitan916#author"},"creator":{"@id":"https:\/\/taitan916.info\/blog\/archives\/author\/taitan916#author"},"image":{"@type":"ImageObject","url":"https:\/\/taitan916.info\/blog\/wp-content\/uploads\/2014\/07\/rubylogo.png","@id":"https:\/\/taitan916.info\/blog\/archives\/2880\/#mainImage","width":256,"height":256},"primaryImageOfPage":{"@id":"https:\/\/taitan916.info\/blog\/archives\/2880#mainImage"},"datePublished":"2018-03-16T01:29:02+09:00","dateModified":"2024-02-22T13:09:28+09:00"},{"@type":"WebSite","@id":"https:\/\/taitan916.info\/blog\/#website","url":"https:\/\/taitan916.info\/blog\/","name":"\u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2","description":"Web\u30a8\u30f3\u30b8\u30cb\u30a2 \/ \u30d7\u30ed\u30b0\u30e9\u30de\u304c\u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2\u3002","inLanguage":"ja","publisher":{"@id":"https:\/\/taitan916.info\/blog\/#person"}}]},"og:locale":"ja_JP","og:site_name":"\u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2","og:type":"article","og:title":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5 | \u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2","og:description":"Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002","og:url":"https:\/\/taitan916.info\/blog\/archives\/2880","og:image":"https:\/\/taitan916.info\/blog\/wp-content\/uploads\/2014\/07\/rubylogo.png","og:image:secure_url":"https:\/\/taitan916.info\/blog\/wp-content\/uploads\/2014\/07\/rubylogo.png","og:image:width":256,"og:image:height":256,"article:published_time":"2018-03-15T16:29:02+00:00","article:modified_time":"2024-02-22T04:09:28+00:00","twitter:card":"summary","twitter:title":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5 | \u52c9\u5f37\u3057\u305f\u3053\u3068\u306e\u30e1\u30e2","twitter:description":"Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002","twitter:image":"https:\/\/taitan916.info\/blog\/wp-content\/uploads\/2014\/07\/rubylogo.png"},"aioseo_meta_data":{"post_id":"2880","title":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5 | #site_title","description":"Ruby\u306e\u52c9\u5f37\u3067\u4f55\u304b\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u8003\u3048\u305f\u3002\u307e\u305f\u3001Rails\u3068\u304b\u306f\u4f7f\u308f\u305a\u7d20\u306eRuby\u3067\u3001\u5c1a\u4e14\u3064Web\u30da\u30fc\u30b8\u3068\u304b\u306f\u7528\u610f\u305b\u305a\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u307f\u4f7f\u7528\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3002\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u304b\u826f\u3055\u3052\u3060\u3068\u601d\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002","keywords":[{"label":"ruby","value":"ruby"}],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-11 05:12:52","updated":"2025-12-18 07:00:31","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/taitan916.info\/blog\" title=\"\u30db\u30fc\u30e0\">\u30db\u30fc\u30e0<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/taitan916.info\/blog\/archives\/category\/ruby\" title=\"Ruby\">Ruby<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tRuby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"\u30db\u30fc\u30e0","link":"https:\/\/taitan916.info\/blog"},{"label":"Ruby","link":"https:\/\/taitan916.info\/blog\/archives\/category\/ruby"},{"label":"Ruby\u3067\u30b5\u30a4\u30c8\u306e\u6b7b\u6d3b\u7ba1\u7406\u3092\u884c\u3044Gmail\u306eSMTP\u30b5\u30fc\u30d0\u7d4c\u7531\u3067\u901a\u77e5\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5","link":"https:\/\/taitan916.info\/blog\/archives\/2880"}],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/comments?post=2880"}],"version-history":[{"count":2,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2880\/revisions"}],"predecessor-version":[{"id":4890,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2880\/revisions\/4890"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/1768"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=2880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=2880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=2880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}