Forum: Ruby on Rails Rails API Doc for Mail::Message?

6fb3da86a91bc657d2a5c0535a21533f?d=identicon&s=25 Derek Lin (rails2012)
on 2012-10-07 00:29
(Received via mailing list)
Hi,

I am very new to Rails.  I am trying to delete an email that I have
retrieved from a pop3 account.  I googled around but couldn't find any
thing on that topic.  I couldn't find any API Doc either.  What do I
need
to do to delete an email?
52f3528c40e9cf28ad0900886eecb128?d=identicon&s=25 Jordon Bedwell (Guest)
on 2012-10-07 01:06
(Received via mailing list)
That really depends on the library (gem) you used, the method you
store it as and most importantly where you stored it at.  Since it's
not a system account (I'm assuming) it's not going to store it in
system mail unless the gem is absolutely ignorant so you would have
had to of told it where and how to store it (the how is subjective
though because you could have stored it as another type of flat file,
mbox or maildir or even just kept it in memory long enough to parse it
into a db.)

Figure out where you stored it and go from there.
6fb3da86a91bc657d2a5c0535a21533f?d=identicon&s=25 Derek Lin (rails2012)
on 2012-10-07 01:17
(Received via mailing list)
Isn't the mail gem part of rails 3.2.8?

In my code, I put require 'mail'

  Mail.defaults do
    retriever_method :pop3,
              address:    "pop.xxx.com",
              port:       995,
              user_name:  'xxx',
              password:   'xxx',
              enable_ssl: true
  end

My email is:


email = Mail.first

I then can access some methods:

      logger.info "Subject: " + email.subject unless email.subject.nil?
      logger.info "From: " + email.from[0] unless
      logger.info "To: " + email.to[0]
      logger.info "Body: " + email.body.decoded
I would like to know where can get some documentation on all the
available
methods I can use.

The mail is in my pop3 account.  How do I delete it off my pop3 account?

I also have questions on how to get attachments from my email... but
maybe
things will be clear when I find out how to find the proper
documentation.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.