Extract the message body with gmailer

Hi,

Does anyone know how extract the message body from a single inbox mail
in gmailer?

Aidy

try GMailer

···

On Feb 13, 1:58 pm, aidy <aidy.le...@googlemail.com> wrote:

Hi,

Does anyone know how extract the message body from a single inbox mail
in gmailer?

Aidy

Not exactly the question you are asking, but you do know that GMail has
IMAP and POP3 interfaces, right?

HTH,

Marcelo

···

On Wed, Feb 13, 2008 at 1:00 PM, aidy <aidy.lewis@googlemail.com> wrote:

Does anyone know how extract the message body from a single inbox
mail in gmailer?

Hi,

The problem I am having is that the msg body is no consistently
returned

def check_purchase_email
  @g = nil
  @msg = nil
  GMailer.connect(:username=>'x@x.com',:password=>'xxxxxxxx') do |@g|
    @g.messages(:label=>'inbox', :read=>false).each_msg {|@msg|
     puts "subject: " + @msg.subject
     puts "from: " + @msg.sender
     puts @msg.body
  }
  end
  @g.disconnect
end

Cheers

Aidy

Hi,

Hi,

The problem I am having is that the msg body is no consistently
returned

def check_purchase_email
  @g = nil
  @msg = nil
  GMailer.connect(:username=>'x@x.com',:password=>'xxxxxxxx') do |@g|
    @g.messages(:label=>'inbox', :read=>false).each_msg {|@msg|
     puts "subject: " + @msg.subject
     puts "from: " + @msg.sender
     puts @msg.body
  }
  end
  @g.disconnect
end

Cheers

Aidy

As a maintainer of gmailutils, I recommend not using gmailer any more.

GMailer is unstable and might not working under a certain circumstance.

If you have any question about gmailer, send email to me.

Regards,

Park Heesob
phasis at gmail dot com

···

--
Posted via http://www.ruby-forum.com/\.