[ANN] gmailer 0.0.4

GMailer is a class for interface to Google's webmail service.

It can fetch mails, save attachements, get cotact lists, invite someone
or send message with file attachments. You can make GMail as an online
backup system or as a virtual filesystem with this library.

CHANGE since 0.0.3 (preivious code could break)
- Remove camelCase methods
- Fix some bugs
- Modify some key name
     subj -> subject , mid -> msg_id, tid -> thread_id, orig_df -> draft_id

Thanks James and Shanko!

The usage is very simple and compact like this:

GMailer.connect(name,pwd) do |g|
  #fetch
  g.fetch(:label=>"my_label") {|snapshot|
        puts "Total # of conversations of my_label = " +
snapshot.box_total.to_s
  }

  #get contact
  g.fetch(:contact=>"freq").each do |item|
    puts "Name: #{item['name']} Email: #{item['email']}"
  end

  #send
  g.send(
      :to => "whoo@foo.bar",
      :subject => "Hello There!",
      :body => "Hi...\n\nBlah blah blah~...",
      :files => ["./test.txt"]
   )

  # get labels
  labels = g.get_labels

  # get messages
  g.get_messages(:label=>labels[0]).each {|m|
     puts "Subject: #{m['subject']} / Snippet: #{m['snippet']}" if m['new?']
  }
end

Now you can connect with proxy server like this

GMailer.connect(:username=>name,:password=>pwd,
                        :proxy_host=>proxy,:proxy_port=>8080,
                        :proxy_user=>user,:proxy_pass=>pass) { |g|
    ...
}

But proxy connection needs some tests.
I know the following error message still exists for proxy connection.

   getaddrinfo: servname not supported for ai_socktype. (SocketError)

What this message means? what is the workaround?

Project:: http://rubyforge.org/projects/gmailutils/
Bugs:: http://rubyforge.org/tracker/?group_id=869

Regards,

Park Heesob

Hi Park,

GMailer is a class for interface to Google's webmail service.

It can fetch mails, save attachements, get cotact lists, invite someone
or send message with file attachments. You can make GMail as an online
backup system or as a virtual filesystem with this library.

  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Really? How? Does it handle files larger than 10MB?

CHANGE since 0.0.3 (preivious code could break)
- Remove camelCase methods
- Fix some bugs
- Modify some key name
     subj -> subject , mid -> msg_id, tid -> thread_id, orig_df -> draft_id

Thanks for the prompt release.
-- shanko

···

--- Park Heesob <phasis@bcline.com> wrote:

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Park Heesob wrote:

GMailer is a class for interface to Google's webmail service.

It can fetch mails, save attachements, get cotact lists, invite someone
or send message with file attachments. You can make GMail as an online
backup system or as a virtual filesystem with this library.

CHANGE since 0.0.3 (preivious code could break)
- Remove camelCase methods
- Fix some bugs
- Modify some key name
     subj -> subject , mid -> msg_id, tid -> thread_id, orig_df -> draft_id

Thanks James and Shanko!

Oh no, thank you!

James

···

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

Hi,

Hi Park,

GMailer is a class for interface to Google's webmail service.

It can fetch mails, save attachements, get cotact lists, invite someone
or send message with file attachments. You can make GMail as an online
backup system or as a virtual filesystem with this library.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Really? How? Does it handle files larger than 10MB?

I guess the large file can be handled by dividing for a certain block size.
Refer to Python's
GmailFS(http://richard.jones.name/google-hacks/gmail-filesystem/gmail-filesystem.html\)

Regards,

Park Heesob

···

--- Park Heesob <phasis@bcline.com> wrote:

Shashank Date wrote:

Hi Park,

GMailer is a class for interface to Google's webmail service.

It can fetch mails, save attachements, get cotact lists, invite someone
or send message with file attachments. You can make GMail as an online
backup system or as a virtual filesystem with this library.

  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Really? How? Does it handle files larger than 10MB?

Split 'em up.

Use whatever it is people use to post those large, multi-part porn files to USENET that I've heard about.

Like, say, uuencode and split.

Consider it a Ruby Quiz project:

Given a big-ass binary file, split it into some number of chunks, mail them to some GMail account, then retrieve all the related parts from that account, and recombine. Verify the results.

James

···

--- Park Heesob <phasis@bcline.com> wrote:

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys