Rails API Doc for Mail::Message?

28 views
Skip to first unread message

rails2012

unread,
Oct 6, 2012, 6:28:02 PM10/6/12
to rubyonra...@googlegroups.com
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?

Jordon Bedwell

unread,
Oct 6, 2012, 7:05:07 PM10/6/12
to rubyonra...@googlegroups.com
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.

rails2012

unread,
Oct 6, 2012, 7:16:13 PM10/6/12
to rubyonra...@googlegroups.com, envy...@gmail.com
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.
Reply all
Reply to author
Forward
0 new messages