TMail-question

How do I access the individual parts of a multipart message using
TMail?

The documentation says:

body -> String
preamble -> String

    the mail body. If the mail is a MIME multipart mail, this
    attribute represents "preamble".

I need to access the first body of a multipart message but I do not
understand how to do it.

Looking at message.parts.public_methods I could not find one which
returns the body of a spesific part.

Any pointers would be welcome please.

Regards
Johann

···

--
Johann Spies Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Fear not, for I am with thee; be not dismayed,
      for I am thy God. I will strengthen thee and I will
      help thee; yea, I will uphold thee with the right hand
      of my righteousness." Isaiah 41:10

VRYWARING: Hierdie vrywaring is bloot 'n toets...

DISCLAIMER: This disclaimer was just added as a test...

Johann Spies wrote:

How do I access the individual parts of a multipart message using
TMail?

The documentation says:

body -> String
preamble -> String

    the mail body. If the mail is a MIME multipart mail, this
    attribute represents "preamble".

I need to access the first body of a multipart message but I do not
understand how to do it.

Looking at message.parts.public_methods I could not find one which
returns the body of a spesific part.

Any pointers would be welcome please.

Regards
Johann
  
Johann,

This is how I do it:

message = TMail::Mail.load(message_file)
message.parts[0] # The first part

Dan

Thanks Dan!

Regards

Johann

···

On Thu, Jun 09, 2005 at 02:34:38AM +0900, Dan Fitzpatrick wrote:

This is how I do it:

message = TMail::Mail.load(message_file)
message.parts[0] # The first part

--
Johann Spies Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Verily, verily, I say unto you, He that heareth my
      word, and believeth on him that sent me, hath
      everlasting life, and shall not come into
      condemnation; but is passed from death unto life."
                               John 5:24

VRYWARING: Hierdie vrywaring is bloot 'n toets...

DISCLAIMER: This disclaimer was just added as a test...