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

NS-BTB7001-0 NSBTB70010 JOHNSON CONTROLS Network Sensor
$82.5
NS-BTB7001-0 NSBTB70010 JOHNSON CONTROLS Network Sensor pictureJohnson Controls 12 Volt Dynasty Charger MILW 12 Volts 8AH GRC 12600M 120vac
$36.0
Johnson Controls 12 Volt Dynasty Charger  MILW 12 Volts   8AH GRC 12600M 120vac pictureJOHNSON CONTROLS T-3311-1 Dual Temperature Dual Pressure Thermostat
$79.0
JOHNSON CONTROLS  T-3311-1  Dual Temperature Dual Pressure Thermostat pictureJohnson Controls NS-BTB7002-0 lot of (10) with free priority shipping
$50.0
Johnson Controls NS-BTB7002-0  lot of (10) with free priority shipping  pictureJohnson Controls Y64T15-0 Class 2 Transformer 120/208/240VAC 60Hz
$14.99
Johnson Controls Y64T15-0 Class 2 Transformer 120/208/240VAC 60Hz picture






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