11-29-2008 06:58 AM
yes, I'm able to send emails with attachments larger than 4k from the message application. But I'm not able to do this programatically. As I mentioned we are using BlackBerry without BES but we are connected to BIS and I'm sending binary data using "application/octet-stream":
Message message = new Message(); message.setSubject("subject"); message.addRecipients(RecipientType.TO, toAddress); Multipart mp = new Multipart(); String body = "This is the message body"; String attachment = "[Data>4K, encoded/compressed using BlockEncryptor/ZLibOutputStream]"; mp.addBodyPart(new TextBodyPart(mp, body)); mp.addBodyPart(new SupportedAttachmentPart(mp, "application/octet-stream", "att1.xyz",
attachment.getBytes())); message.setContent(mp); Transport.send(message);
It seems to be a quite simple thing to send a message with attachments and I do not know if I did something wrong or if the Transport.send has some limitations to BIS users. Do you have any suggestions?