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

Genuine WESCO N6K universal joint cross 2.475" unknown appl. vintage driveline
$19.99
Genuine WESCO N6K universal joint cross 2.475Vintage Enterprise Sausage, Wine, Apple Stuffer
$250.0
Vintage Enterprise Sausage, Wine, Apple Stuffer picture6fFT VOLEX APPLE 3 PRONG POWER CORD E62405Sp VINTAGE
$2.95
6fFT VOLEX APPLE 3 PRONG POWER CORD E62405Sp VINTAGE  picturevintage sausage stuffer Apple Smasher wine press squeeze Enterprise grapes cast
$19.99
vintage sausage stuffer Apple Smasher wine press squeeze Enterprise grapes cast pictureVintage Enterprise 4 Quart Sausage Stuffer Lard Apple Wine Press 4 Qt
$199.99
Vintage Enterprise 4 Quart Sausage Stuffer Lard Apple Wine Press 4 Qt picture






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