BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-29-2007, 04:22 PM   #1 (permalink)
New Member
 
Join Date: Apr 2007
Model: 8800
PIN: N/A
Carrier: cingular
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Email Attachment Read

Please Login to Remove!

I am trying to read an email attachment via the following code:
Part p = mp.getBodyPart(i);
String contentype = p.getContentType();
Object oPart = p.getContent();

oPart always returns null for UnsupportedAttachmentPart. ContentType is application/octet-stream.

I have also tried creating an inputStream which also returns null.

UnsupportedAttachmentPart uap = (UnsupportedAttachmentPart)mp.getBodyPart(i);
Object attachText = uap.getContent();
InputStream in=uap.getInputStream();

I have spent countless hours searching everywhere...couldn't find an answer to "how to read an email attachment". I would greatly appreciate it if anyone can answer my questions.
Thanks much.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Honeywell 4074ETJ Airflow Switch NEW IN BOX
$19.99
Honeywell 4074ETJ Airflow Switch NEW IN BOX pictureLeviton Decora Combo Switch 1-3 Way 1 Single Pole Ivory 5641-I NIB
$19.99
Leviton Decora Combo Switch 1-3 Way 1 Single Pole Ivory 5641-I NIB pictureDC12V Radar Microwave Induction Switch LED Ad Light Box Corridor Sensing Control
$3.49
DC12V Radar Microwave Induction Switch LED Ad Light Box Corridor Sensing Control picture2Pcs Adjustable 10A Auto On Off Light Switch Control Sensor DC/AC 12V
$4.99
2Pcs Adjustable 10A Auto On Off Light Switch Control Sensor DC/AC 12V  pictureHubbell HBL1222I Switch Ivory Nylon Toggle Spec Grade 2-Pole 20A NEW IN BOX
$24.99
Hubbell HBL1222I Switch Ivory Nylon Toggle Spec Grade 2-Pole 20A NEW IN BOX picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.