Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
vjkmr
Posts: 78
Registered: ‎05-17-2012
My Device: 9900 - OS 7.0 Torch device

Emailing a AudioFile as attachment

Hi All

 

I want to send a Audiofile as email attachment by using the device. For this I am using available code snippet like followed.

SupportedAttachmentPart attach = new SupportedAttachmentPart( multipart,"application/octet-stream", "AudioRecordingTest.amr", IOUtilities.streamToBytes(audioStream));
                               multipart.addBodyPart(attach);
                               multipart.addBodyPart(textPart);
                               multipart.addBodyPart(attach);
                               msg.setContent(multipart);
                               Transport.send(msg);

 

Its showing as delivered in my device but its not reaching to destination. I have given address as follows

recipients[0] = new Address("creativenledge@gmail.com", "XYZ");
              msg.addRecipients(Message.RecipientType.TO, recipients);
              msg.setSubject("Audio");

 

Can anybody explain the problem here.

Developer
vjkmr
Posts: 78
Registered: ‎05-17-2012
My Device: 9900 - OS 7.0 Torch device

Re: Emailing a AudioFile as attachment

Hi All

 

I have done in OS6.0 & OS7.0 device where it is working fine but in 4.5 its not working.