<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mirakui</author_name>
  <author_url>https://blog.hatena.ne.jp/mirakui/</author_url>
  <blog_title>昼メシ物語</blog_title>
  <blog_url>https://blog.mirakui.com/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>twitterのフォロー通知メールとか、Amazonの発送通知メールとか、そういうメールを受け取ったらその内容に応じていろいろ処理したい時ってありますよね。 でもまあ、今時個人でメールサーバ立てるのなんて流行らないですし、自由にprocmailを仕込むわけにもいかないですよね。というわけでGmailのIMAPを使いましょう。 rubyで書くとこんな感じ。 require 'rubygems' require 'net/imap' require 'kconv' require 'pit' require 'logger' class ImapFetcher def initialize(pit…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.mirakui.com%2Fentry%2F20090429%2FRubyGmailImap&quot; title=&quot;RubyでGmailからIMAP経由で未読メールを取得する - 昼メシ物語&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-04-29 00:00:00</published>
  <title>RubyでGmailからIMAP経由で未読メールを取得する</title>
  <type>rich</type>
  <url>https://blog.mirakui.com/entry/20090429/RubyGmailImap</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
