BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-06-2007, 06:52 AM   #1 (permalink)
New Member
 
Join Date: May 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 6
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Empty e-mail attachment

Please Login to Remove!

Hi there.

I'm trying to send JPEG image as an attachment from my application.
I get a sample how to create e-mail message with attachment from Development Guide.
After sending such e-mail I can see it in "Sent Items" folder, but attachment seems not sent.
When I get this e-mail with outlook there is no attachment there.
And unlike original BB application I could not open at attachment. All I can get is that message has 1 Attachment, it's name and size but no content.

here is a code I'm using to create an attachment:
attData - byte array that contains encoded JPEG image.

Store store = Session.getDefaultInstance().getStore();
Folder[] folders = store.list(Folder.SENT);
Folder sentfolder = folders[0];
_msg = new Message(sentfolder);

Multipart multipart = new Multipart();
SupportedAttachmentPart attach = new SupportedAttachmentPart(multipart, "image/jpeg, "test_file.jpg", attData);
multipart.addBodyPart(attach);

try
{
_msg.setContent(multipart);
}
catch(MessagingException e)
{
System.out.println("Attachment adding exception");
return;
}

Can somebody help me here?
Thank you,
Cycom
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

(J06) NEW Genuine OEM Dell 5313118052F0 Generic M-M 6ft Audio Cable Assembly
$25.0
(J06) NEW Genuine OEM Dell 5313118052F0 Generic M-M 6ft Audio Cable Assembly pictureNew Dell Lamp Bulb 08W621 OEM Projector
$59.99
New Dell Lamp Bulb 08W621 OEM Projector   pictureDELL 5130cdn High Capacity Black Toner - OEM, SEALED,PERFECT (CT201348)
$90.0
DELL 5130cdn High Capacity Black Toner - OEM, SEALED,PERFECT  (CT201348) pictureLot of 25 New Dell 0KKMYD Display Port to DVI Adapters - OEM
$155.0
Lot of 25 New Dell 0KKMYD Display Port to DVI Adapters - OEM pictureNew Dell - PF029 High Capacity CYAN Toner 3115CN/3110CN OEM
$56.0
New Dell - PF029 High Capacity CYAN Toner 3115CN/3110CN OEM picture






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