¿Cómo puedo adjuntar múltiples imágenes con correo electrónico en Blackberry?
Quiero adjuntar varias imágenes con correo electrónico en BB. ¿Cómo puedo hacer esto? ¿Alguien tiene una idea? por favor, ayúdeme. A continuación se muestra mi código, que funciona bien cuando solo envío una imagen con el correo electrónico. Entonces, ¿qué modificación debo hacer en mi código para adjuntar varias imágenes?
<code> public static void SendMailAttachment(Bitmap screenshot) { String htmlContent = "String" ; try { Multipart mp = new Multipart(); Message msg = new Message(); Address[] addresses = {new Address("","")}; for (int i = 0; i<2 ; i++) { PNGEncodedImage img = PNGEncodedImage.encode(screenshot); SupportedAttachmentPart pt = new SupportedAttachmentPart(mp, img.getMIMEType(), "Weed.png", img.getData()); mp.addBodyPart(pt); } msg.setContent(mp); msg.setContent(htmlContent); msg.addRecipients(RecipientType.TO, addresses); msg.setSubject("Subject"); Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(msg)); } catch (AddressException ex) { System.out.println("Exception -->"+ex.getMessage()); } catch (MessagingException ex) { System.out.println("Exception -->"+ex.getMessage()); } } </code>
Gracias de antemano.