Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
mail.body.decoded returning binary?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ari gold  
View profile  
 More options Nov 9 2012, 11:23 pm
From: ari gold <arigo...@gmail.com>
Date: Fri, 9 Nov 2012 20:23:50 -0800 (PST)
Local: Fri, Nov 9 2012 11:23 pm
Subject: mail.body.decoded returning binary?

Hi there,

I have a simple script which is looking at an email sent via Apple Mail.
 No text in the body of the email, just a picture attached.  Basically
mail.body or mail.body.decoded is returning binary. The email is all ASCII.

Here's some of the email headers:

Content-Type: image/jpeg; x-unix-mode=0644;
name="apollo16_earth_northamerica.jpeg"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename=apollo16_earth_northamerica.jpeg
X-Mailer: Apple Mail (2.1283)

and here's my lil' script:

#! /usr/local/bin/ruby

require 'mail'

mail =
Mail.read('emailsForDebugging/applemail_imagenotext_base64inline.eml')

mail.body.decoded

Any ideas?  I'm going to look through the source code but I thought I'd
post here first to see if I'm just missing something simple.

Thanks..


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ari gold  
View profile  
 More options Nov 10 2012, 3:20 am
From: ari gold <arigo...@gmail.com>
Date: Sat, 10 Nov 2012 00:20:32 -0800 (PST)
Local: Sat, Nov 10 2012 3:20 am
Subject: Re: mail.body.decoded returning binary?

To answer my own question, this worked:

mail.body.raw_source

It was printing the converted picture - as if you did a "less picture.jpeg".


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kashyap k  
View profile  
 More options Nov 10 2012, 2:24 am
From: kashyap k <kashyap.k...@gmail.com>
Date: Sat, 10 Nov 2012 12:54:54 +0530
Local: Sat, Nov 10 2012 2:24 am
Subject: Re: [ruby-mail] mail.body.decoded returning binary?

What exactly do you want to do? It think you forgot to ask that unless I'm
missing something :)

--
Kashyap KMBC

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »