07-06-2007, 06:52 AM
Join Date: May 2007
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | Empty e-mail attachment
Please Login to Remove!
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;
_msg = new Message(sentfolder);
Multipart multipart = new Multipart();
SupportedAttachmentPart attach = new SupportedAttachmentPart(multipart, "image/jpeg, "test_file.jpg", attData);
System.out.println("Attachment adding exception");
Can somebody help me here?