Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

James Robertson http://www.r0bertson.co.uk

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Retrieve your Gmail messages as an XML feed

This Ruby example shows how to retrieve your most recent email as an atom XML feed from the Google Apps website.

require 'rubygems'
require 'httpclient'

url = "https://mail.google.com/a/yourwebsite.com/feed/atom"
client = HTTPClient.new
client.debug_dev = STDOUT if $DEBUG
client.set_auth(url, 'yourname@yourwebsite.com', 'yourpassword')
resp = client.get(url)


Note: You might require to gem install httpclient.
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS