09-30-2010 08:50 AM
I succeded in retrieving programmatically 128Kb of attachment data from an email. After a lot of tinkering with the attachment size i realized that i'm limited to 32kb for a supported attachment part although my os is 4.6. ( I think this is a limitation from the vodafone BES ). But i managed to split an 128kb file in 4 x 32kb files and send an email with the 32kb files attached to it from pc to phone. My application on the phone gets the email and recreates the original file and stores it on the sdcard. This way I thought i could send much larger files (at least 1MB) but i encountered another problem , if the email has more than 4 attachments it is not received by the phone.
I guess now i can't send files larger than 128kb for my application (this sucks).
Has anyone ever tried this before ? Is there a more simpler way of programmatically retrieving large attachment files ?
Solved! Go to Solution.
09-30-2010 11:21 AM
My attachment files have the name "x-rimdevice-MyDocFile0.doc.
I've tried spliting my original file in 64000 bytes files , but only one attachment is received by the phone, don't know why. I'm executing Transport.more() on every SupportedAttachmentPart of the Message and after every Transport.more() i wait 10 sec but still, only one 64kb attachment is received.This thing doesn't happen if the attachments have 32kb, they are all received. Too bad my phone doesn't have os 5.0.
After many test with different attachment sizes I found out that sometimes only 2 or 3 attachments are received and the last one remains on the server.
Has anyone encountered this problem before and managed to solve it ?
09-30-2010 11:39 AM
can't you download them using http? base64 (email) adds roughly a third to the real data size.
we usually send only a trigger mail with the link or similar, and download the content
10-06-2010 06:03 AM
It worked. Now my application downloads the so called attachment files from my http server. I just send emails to the phone and I include an info text which tells the phone application what file to request from the server. My only problem now is that I don't have a public server and I have to connect through wifi with the phone in order to download attachments. Using the MDS-CS Simulator I found out that there is a limit on a HttpConnection which doesn't let me read more than 256Kb. I don't know if this is the case when using my gprs Vodafone connection.
On wifi it works fine , I managed to download 3mb files.