P
Park Heesob
Hi,
Sorry for previous encoding message.
I'm happy to announce first version of GMailer, a class for interface to
Google's webmail service.
You can fetching gmails
require "gmailer"
gmail = GMailer.new
gmail.setLoginInfo(name, pwd)
if gmail.connect
gmail.fetchBox(GM_LABEL, "my_label", 0)
snapshot = gmail.getSnapshot(GM_LABEL)
if snapshot
puts "Total # of conversations of my_label = " +
snapshot.box_total.to_s
end
gmail.disconnect
end
Sending new gmails
require "gmailer"
gmail = GMailer.new
gmail.setLoginInfo(name, pwd)
if gmail.connect
to = "(e-mail address removed), my_friend@his_company.com, (e-mail address removed)"
cc = "(e-mail address removed)"
subj = "Hello There!"
message = "Hi...\n\nBlah blah blah~..."
attachments = ["./my_pic.jpg", "./my_cv.txt"]
gmail.send(to, subj, message, cc, '','', '', attachments, false, '')
end
Or playing around with contact list
require "gmailer"
gmail = GMailer.new
gmail.setLoginInfo(name, pwd)
if gmail.connect
gmail.fetchBox(GM_CONTACT, "freq", 0)
snapshot = gmail.getSnapshot(GM_CONTACT)
puts "Your frequently used addresses:"
snapshot.contacts.each { |item|
puts "Name: " + item["name"] + ", Email: " + item["email"]
}
end
You can find out more about GMailer at:
http://rubyforge.org/projects/gmailutils
Enjoy!
Park Heesob
Sorry for previous encoding message.
I'm happy to announce first version of GMailer, a class for interface to
Google's webmail service.
You can fetching gmails
require "gmailer"
gmail = GMailer.new
gmail.setLoginInfo(name, pwd)
if gmail.connect
gmail.fetchBox(GM_LABEL, "my_label", 0)
snapshot = gmail.getSnapshot(GM_LABEL)
if snapshot
puts "Total # of conversations of my_label = " +
snapshot.box_total.to_s
end
gmail.disconnect
end
Sending new gmails
require "gmailer"
gmail = GMailer.new
gmail.setLoginInfo(name, pwd)
if gmail.connect
to = "(e-mail address removed), my_friend@his_company.com, (e-mail address removed)"
cc = "(e-mail address removed)"
subj = "Hello There!"
message = "Hi...\n\nBlah blah blah~..."
attachments = ["./my_pic.jpg", "./my_cv.txt"]
gmail.send(to, subj, message, cc, '','', '', attachments, false, '')
end
Or playing around with contact list
require "gmailer"
gmail = GMailer.new
gmail.setLoginInfo(name, pwd)
if gmail.connect
gmail.fetchBox(GM_CONTACT, "freq", 0)
snapshot = gmail.getSnapshot(GM_CONTACT)
puts "Your frequently used addresses:"
snapshot.contacts.each { |item|
puts "Name: " + item["name"] + ", Email: " + item["email"]
}
end
You can find out more about GMailer at:
http://rubyforge.org/projects/gmailutils
Enjoy!
Park Heesob