Hi Zeljko,

Thanks. You are always helpful.

I think you are on vacation Yesterday, otherwise i could have done it
yesterday.

I tried doing the stuff using "mail" gem, but it didn't worked [Reason
is : im not much aware of this gem].

I posted query on ruby mail forum too, but no replies to solve my
problem.

If i use "mail" gem, then when i try to access new unread email, it
fails, it always returns first mail whether it is read or unread.

Here is what i posted on mail forum :

######################

Hi,
I added following code in my WATIR script, and abel to get first
email  from my Inbox
require 'mail'
require 'openssl'
        Mail.defaults do
          retriever_method :pop3, :address    =>
"email.someemail.com",
                                  :port       => 995,
                                  :user_name  => 'domain/username',
                                  :password   => 'pwd',
                                  :enable_ssl => true
        end
        puts Mail.first

I am new to this forum and have following questions :

1.      How can I get all the unread emails ?
2.      How can I get all links that are present inside emails? or
mail message body from the email?
3.      Can I click Links present inside an email? [This i can do once
i have an link]
4.      How can I get emails from a specific folder, if I have
subfolders?

If some one can help me, then that will be nice.

Thanks in advance.
Bhavesh

###########################

The webpage for mail gem states that if you use mail.first, it will
return first unread email, so oi did that.

When i have not received any input/help here, i thought i can use
Autoit, to get it working from outlook.

With autoit, still im struggling to mark  mail as "read" from "unread"
once i get details [mail body] from the mail.

And if i use mail gem, then in that case, im totally stuck.

If you can help me on "mail" gem, with questions i posted, then it
will be very helpfull.  Also if you tell me how to mark mail as "read"
from "unread" when i use mail gem.

thanks
Bhavesh


On Apr 25, 12:31 am, Željko Filipin <[email protected]> wrote:
> On Wed, Apr 25, 2012 at 5:13 AM, Bhavesh <[email protected]> wrote:
> > Only thing if someone can help is,  i got the email body  but as same
> > time i want to mark that email as "read" instead of "unread", so that
> > next time when i have another new email, i get content from that new
> > email and previous all emails are in read state.
>
> I guess Chuck is trying to tell you that Watir automates browsers, and you
> want to automate Outlook. It does not matter if you are using Watir to send
> mail, you have to use another tool to read mail. Are you aware that you are
> not using Watir to drive Outlook? (You are using Ruby.)
>
> I have done a lot of mail sending/reading/parsing and I would highly
> suggest that you use another tool (like mail gem) for that, instead of
> automating Outlook. If you have questions on how to do that, I would be
> glad to help.
>
> Željko
> --
> watir.com/book - author

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to