ruby email libraries

T

testautomated6

Hi,

Does anyone know of any stable ruby email libraries, I just need to
read: the subject, the sender and the body? Had problems with both
gmailer and hotmailer.

Cheers

Aidy
 
T

testautomated6

Hi,

Thanks for the feedback. but all I need to do is read the msg.body of
the last unread email. But where is the login method for the username
and password?

Cheers

Aidy
 
R

Robert Klemme

Thanks for the feedback. but all I need to do is read the msg.body of
the last unread email. But where is the login method for the username
and password?

What do you mean? You asked for a library that allows to read "subject,
sender and body". That's what you got as far as I can see. Is it
possible that you wanted something completely different without
specifying it?

Cheers

robert
 
D

Damjan Rems

unknown said:
Hi,

Does anyone know of any stable ruby email libraries, I just need to
read: the subject, the sender and the body? Had problems with both
gmailer and hotmailer.

Cheers

Aidy

require 'net/imap'
imap = Net::IMAP.new('mymail.dot.com')
imap.login('usr', 'pwd')
imap.select('Inbox')
n = imap.search(["SINCE", "1-Jan-1969"])
listInbox = imap.fetch(n, ["ENVELOPE","UID"] )
listInbox.each do | a |
puts a.attr["ENVELOPE"].subject
....
end

It's something to start with. You find out the rest. This has been
tested on MS Exchange 2000.


by
TheR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,234
Messages
2,571,179
Members
47,811
Latest member
GregoryHal

Latest Threads

Top