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

RS-1007 Computers & Accessories PRO CAT IV 1000A Analog Clamp Meter
$243.05
RS-1007 Computers & Accessories PRO CAT IV 1000A Analog Clamp Meter pictureMeasurement Computing PCI-DAS1001/2 Multifunctional Digital Analog I/O Card
$475.0
Measurement Computing PCI-DAS1001/2 Multifunctional Digital Analog I/O Card pictureMeasurement Computing PCI-DDA08/16 8-channel 16-bit analog output 48 digital I/O
$395.0
Measurement Computing PCI-DDA08/16 8-channel 16-bit analog output 48 digital I/O pictureComputer Analog Instrument Number Readout German 24 Volt FS066 National Lab Lot
$84.0
Computer Analog Instrument Number Readout German 24 Volt FS066 National Lab Lot  pictureMeasurement Computing 16 Channel PCI Analog Interface Board PCI-DAS1000
$34.99
Measurement Computing 16 Channel PCI Analog Interface Board PCI-DAS1000 picture






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