<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Hone Watson Bookmarks &#187; Gmail</title>
	<atom:link href="http://bookmarks.honewatson.com/tag/gmail/feed/" rel="self" type="application/rss+xml" />
	<link>http://bookmarks.honewatson.com</link>
	<description>I bring you the best from the web - random bookmarks.</description>
	<lastBuildDate>Tue, 31 Jan 2012 03:45:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bookmarks.honewatson.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Hone Watson Bookmarks &#187; Gmail</title>
		<link>http://bookmarks.honewatson.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bookmarks.honewatson.com/osd.xml" title="Hone Watson Bookmarks" />
	<atom:link rel='hub' href='http://bookmarks.honewatson.com/?pushpress=hub'/>
		<item>
		<title>Python Gmail imaplib search subject get attachments</title>
		<link>http://bookmarks.honewatson.com/2009/08/11/python-gmail-imaplib-search-subject-get-attachments/</link>
		<comments>http://bookmarks.honewatson.com/2009/08/11/python-gmail-imaplib-search-subject-get-attachments/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 09:52:31 +0000</pubDate>
		<dc:creator>honewatson</dc:creator>
				<category><![CDATA[Google Apps]]></category>
		<category><![CDATA[Python Programming]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[Imaplib]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://bookmarks.honewatson.com/2009/08/11/python-gmail-imaplib-search-subject-get-attachments/</guid>
		<description><![CDATA[import email, getpass, imaplib, os detach_dir = '.' ### directory where to save attachments (default: current) m = imaplib.IMAP4_SSL('imap.gmail.com', 993) m.login('username@gmail.com','password') keywordsSearch = 'bananas oranges' searchString = "(ALL SUBJECT '%s')" % keywordsSearch ### m.search(None, "(ALL SUBJECT 'bananas oranges')") resp, items = m.search(None, searchString) items = items[0].split() for emailid in items: resp, data = m.fetch(emailid, "(RFC822)") [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bookmarks.honewatson.com&amp;blog=1388057&amp;post=380&amp;subd=honewatson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="code">
<pre>
import email, getpass, imaplib, os

detach_dir = '.'

### directory where to save attachments (default: current)

m = imaplib.IMAP4_SSL('imap.gmail.com', 993)
m.login('username@gmail.com','password')
keywordsSearch = 'bananas oranges'
searchString = "(ALL SUBJECT '%s')" % keywordsSearch

### m.search(None, "(ALL SUBJECT 'bananas oranges')")
resp, items = m.search(None, searchString)
items = items[0].split()
for emailid in items:
    resp, data = m.fetch(emailid, "(RFC822)")
    email_body = data[0][1]
    mail = email.message_from_string(email_body)
    if mail.get_content_maintype() != 'multipart':
        continue
    print "["+mail["From"]+"] :" + mail["Subject"]
    for part in mail.walk():
        if part.get_content_maintype() == 'multipart':
            continue
        if part.get('Content-Disposition') is None:
            continue
        filename = part.get_filename()
        counter = 1
        if not filename:
            filename = 'part-%03d%s' % (counter, 'bin')
            counter += 1
        att_path = os.path.join(detach_dir, filename)
        if not os.path.isfile(att_path) :
            fp = open(att_path, 'wb')
            fp.write(part.get_payload(decode=True))
            fp.close()
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/honewatson.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/honewatson.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/honewatson.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/honewatson.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/honewatson.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/honewatson.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/honewatson.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/honewatson.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/honewatson.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/honewatson.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/honewatson.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/honewatson.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/honewatson.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/honewatson.wordpress.com/380/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bookmarks.honewatson.com&amp;blog=1388057&amp;post=380&amp;subd=honewatson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bookmarks.honewatson.com/2009/08/11/python-gmail-imaplib-search-subject-get-attachments/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f4e9f5ca1121158385c9408cb2dafd03?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">honewatson</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Apps Sending Limit</title>
		<link>http://bookmarks.honewatson.com/2008/05/08/google-apps-sending-limit/</link>
		<comments>http://bookmarks.honewatson.com/2008/05/08/google-apps-sending-limit/#comments</comments>
		<pubDate>Thu, 08 May 2008 22:44:16 +0000</pubDate>
		<dc:creator>honewatson</dc:creator>
				<category><![CDATA[Google Apps]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://bookmarks.honewatson.com/2008/05/08/google-apps-sending-limit/</guid>
		<description><![CDATA[You can send more than 500 emails per day by using Google&#8217;s recommendation of creating more than one account for sending. Create multiple user accounts to send mail. For example, &#8216;Campus Admin1&#8242; and &#8216;Campus Admin2&#8242; can each send 500 messages to reach 1000 unique recipients. Stagger mass communications over the course of two days. For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bookmarks.honewatson.com&amp;blog=1388057&amp;post=299&amp;subd=honewatson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can send more than 500 emails per day by using Google&#8217;s recommendation of creating more than one account for sending.</p>
<p><span id="more-299"></span></p>
<blockquote><ul>
<li>Create multiple user accounts to send mail. For example, &#8216;Campus Admin1&#8242; and &#8216;Campus Admin2&#8242; can each send 500 messages to reach 1000 unique recipients.</li>
<li></li>
<li>Stagger mass communications over the course of two days. For example, send messages to 500 recipients on day one, wait for 24 hours, and send messages to another 500 recipients on day two. </li>
</ul>
</blockquote>
<p>One wonders how this would <a href="http://www.google.com/support/a/bin/answer.py?hl=en-ca&amp;answer=59797">work in practice</a> given the 2nd suggestion.  It seems that at the moment Google Apps is only suitable for small businesses.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/honewatson.wordpress.com/299/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/honewatson.wordpress.com/299/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/honewatson.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/honewatson.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/honewatson.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/honewatson.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/honewatson.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/honewatson.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/honewatson.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/honewatson.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/honewatson.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/honewatson.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/honewatson.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/honewatson.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/honewatson.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/honewatson.wordpress.com/299/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bookmarks.honewatson.com&amp;blog=1388057&amp;post=299&amp;subd=honewatson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bookmarks.honewatson.com/2008/05/08/google-apps-sending-limit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f4e9f5ca1121158385c9408cb2dafd03?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">honewatson</media:title>
		</media:content>
	</item>
	</channel>
</rss>
