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

MP3-FLASH-1 MP3 voice module flash Memory Module USB module
$3.99
MP3-FLASH-1 MP3 voice module flash Memory Module USB module pictureK9F2G08U0A-PCB0 TSOP-48 256M x 8 Bit NAND Flash Memory 2.70 ~ 3.60V ROHS 2 PCS
$5.95
K9F2G08U0A-PCB0 TSOP-48 256M x 8 Bit NAND Flash Memory 2.70 ~ 3.60V ROHS 2 PCS picture NEW Casper KING Memory Foam Mattress
$750.0
 NEW Casper KING Memory Foam Mattress pictureSMITH CORONA THE OFFICE 2000 MEMORY TYPEWRITER
$50.0
SMITH CORONA THE OFFICE 2000 MEMORY TYPEWRITER pictureAllen Bradley Guardmaster 442L-CSFZNMZ-10 A Memory Module 2-031-503 E111235 Cabl
$259.99
Allen Bradley Guardmaster 442L-CSFZNMZ-10 A Memory Module 2-031-503 E111235 Cabl picture






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