BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-17-2008, 11:01 AM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8300
PIN: N/A
Carrier: od did
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how to handle Mail Attachements

Please Login to Remove!

Since I'm totally new to this Blackberry topic, I'm surprised how much difficulties I have to send simple E-Mail messages with attachments from/to device.

1. from device: message is never sent (via the E-Mail Server Simulator), remains always in sending... state

2. to device: message arrives, but attachment (has size, type, etc...) has no content (=null)

Code is (runs in Simulator, and therefore needs not to be signed according to documentation):

SupportedAttachmentPart part;
part.getContent();

There's some header information, that can be set
e.g. x-rimdeviceX.png for sending pngs
I used that, I didn't use that -> no change

Besides:
Sepific content is empty as I knew threw code (part.getContent())

Content, that I don' handle with code (e.g. png-files) can be opened, but nothing happens...
if a png file arrives on the blackberry, open attachment..
Than the file name is visible, but nothing else.
How can one view, that there's an image behind the filename? (just for testing purposes)

Is Email Server Simulator the problem?
Strange
Offline  
Old 07-17-2008, 01:27 PM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!

Okay, I've run into a number of email attachment issues in recent weeks. Most have been resolved, but there are a couple that could be causing your problems.

The first is: the device OS version. Email attachment handling does not work correctly with any 4.5.0.X device OS, where X is less than 52. In addition, I found that email attachment handling also did not work with the 4.3.0.Y version that Sprint released with its BlackBerry 8330; I do not recall whether simulators had the same issue, but it wouldn't surprise me. Simulator versions track the device versions; no BlackBerry 4.3 device OS correctly handled email attachments, and no pre-4.5.0.52 device OS correctly handled them either, so my guess is no 4.3 simulator and no pre-4.5.0.52 simulator will handle them correctly, no matter what.

Second: until last Sunday, BIS-based email transmissions were broken when it came to delivering email attachments. Any device associated with a BIS (BlackBerry Internet Service, basically an email address that looks like [email address] or [email address], etc.). That problem was fixed as of this past Sunday, so BIS devices should be reading email attachments correctly at this point (and the device OS version didn't matter; 4.2.X devices were failing email attachment handling until the BIS services were patched over the weekend).

Now, assuming you're not using a 4.3 simulator, and assuming your email service simulator (ESS) is set up correctly, email attachments should get delivered to your application running on the simulator. However, there are a few quirks to setting up the ESS. In the "BlackBerry Email and MDS Services Simulators 4.1.2\ESS\help" folder is a document called "Using_the_Email_Server_Simulator.html" which provides an explanation of how to set up the ESS - I've gotten it to work by giving it my work email access (we use Outlook) parameters (server name, username, password) and it effectively becomes a bot that polls my corporate Exchange server for email and delivers what it finds there to the BlackBerry simulator, attachments and all.

You will likely want to try the "Load Test" which will attempt to load (into the ESS) all the email currently available from the mail server that the ESS is pointed to. This may take a few minutes to get working, but you should see a list of all the email available on the server. I didn't normally need to do this, but it's a good way to check that the ESS is communicating properly with the email server it's supposed to be polling.

I have not yet been able to get the BlackBerry simulator to transmit email from the simulator to a real email account. Since I haven't had a serious necessity to do so, it hasn't been a priority for me to figure out how to do that.

Beyond that, make sure that the attachment filename is prepended with "x-rimdevice". It's not altogether clear that this is required for device OS 4.3 and later, although it's not altogether clear that I'm mis-remembering something (it happens every once in awhile). Certainly, that's how it used to work, and if it's no longer necessary, it doesn't hurt.

Good luck!

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 07-18-2008, 02:40 AM   #3 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8300
PIN: N/A
Carrier: od did
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

it must be some very simple thing.

On device it's like:

SupportedAttachmentPart part;

...
part.getFilename() works and fetches the filename of the Attachment
part.getSize() retrieves the correct size of the Attachment

part.getContent() is always null.

Last one is the problem.
Offline  
Old 07-18-2008, 03:59 AM   #4 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8300
PIN: N/A
Carrier: od did
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by holy3daps View Post

and no pre-4.5.0.52 simulator will handle them correctly, no matter what.
My Simulator shows Software version 4.5.0.44

I've downloaded the newest JDE from blackberry site.

Strange..
Offline  
Old 07-18-2008, 04:11 AM   #5 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8300
PIN: N/A
Carrier: od did
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

is there a way to update the operating system of the simulator?
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





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