trampoline / rews

a Ruby client for Exchange Web Services
MIT License
6 stars 1 forks source link

Unable to get Attachment Content #1

Open nvijayap opened 12 years ago

nvijayap commented 12 years ago

Hello,

I am trying to get hold of the attachment content, but am seeing just these ...

[:attachment_id, :name, :content_type, :content_id]

Here's the code snippet I am using ...

email.each do |m|
  unless m.attributes[:is_read]
    if m.attributes[:has_attachments]
      attachments = []
      m.attributes[:attachments].each do |k,v|
        if v.is_a?(Hash)          # only one attachment
          p "..............................................."
          p k
          p "-----------------------------------------------"
          p v.keys
          p "..............................................."

How do I get the attachment content?

Thanks Naga Vijay

mccraigmccraig commented 12 years ago

hi naga,

i've not been working on this for quite a while, and i don't have an exchange testbed to hand, so i can't help directly

i never had a use for getting attachments while working on rews (i was interested in traffic analysis, which doesn't require any content access), so i don't know whether it works or otherwise : it sounds from your report that some more work might be required to get it working

if you want to have a go, and if you need any help in understanding the code, feel free to message me

:mccraig