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

CISCO IP PHONE 7970 VoIP IP OFFICE/BUSINESS PHONE
$48.97
CISCO IP PHONE 7970 VoIP IP OFFICE/BUSINESS PHONE pictureCisco Systems IP Phone 7941 Series CP-7941G 7900 VoIP Business Phone
$9.99
Cisco Systems IP Phone 7941 Series CP-7941G 7900 VoIP Business Phone picture12 6416D+M Avaya Definity VOIP Digital 2-Way 16-Button Speakerphones+Stands EUC
$25.0
12 6416D+M Avaya Definity VOIP Digital 2-Way 16-Button Speakerphones+Stands EUC pictureShoreTel 560 S6 IP Phone VoIP Telephone w/ Handset and Stand
$99.83
ShoreTel 560 S6 IP Phone VoIP Telephone w/ Handset  and Stand pictureCISCO IP PHONE 7962 VoIP IP OFFICE/BUSINESS PHONE
$35.94
CISCO IP PHONE 7962 VoIP IP OFFICE/BUSINESS PHONE picture






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