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
chathuradd
Posts: 28
Registered: ‎12-18-2008
My Device: Not Specified
Accepted Solution

sending an image through email..

hi,

I'm using JDE v4.3 and target specially BlackBerry Curve models.

My requirement is to send an image through email..

i.e. When user opens the application there should be a camara option and he should be able to take a photo and send it immediately to an email address (I can access the camera upto now..)

I'm quite new to BlackBerry development, so can anyone suggest some ideas to achieve this functionality?

 

 

Thanks...

Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: sending an image through email..

Check the links below.

 

Developer Knowledge Base

 

BB Developer Documentation

 

Developer Video Library

 

There are useful resources. Search there for camera interactions (also check camera sample in recent JDE downloads).

Also look in Knowledge Base for email sending and attachments handling.

Developer
chathuradd
Posts: 28
Registered: ‎12-18-2008
My Device: Not Specified

Re: sending an image through email..

Thanks a lot for the resources you have provided.

Initially I tried to send just an email(only text) by using the Email Service Simulator(EES) but got an issue.

I configured EES with the MS Office Outlook. There when I tried make a test connection with EES from Outlook it connected with POP3 but failed to connect with SMTP. Any reason why it didnt connect?

 

After that I used a sample application called "Email Sample" in BB Labs. After running it I sent a mail to earlier specified email address. It was sent from the device but when I try access the inbox using Outlook it gave an error. 

 

 

This is what I had in command prompt after sending the mail from the device simulator...

 

failed to create udp packet
java.io.FileNotFoundException: c:\temp\udppacket.11.bin (The system cannot find
the path specified)
<Tue Dec 23 13:24:19 IST 2008>: [33] :<DEBUG>:<LAYER = UDP, EVENT = Receiving, S
IZE = 11, SOURCE = localhost:19780, DESTINATION = localhost>
failed to create udp packet
java.io.FileNotFoundException: c:\temp\udppacket.12.bin (The system cannot find
the path specified)
<Tue Dec 23 13:32:01 IST 2008>: [34] :<DEBUG>:<LAYER = UDP, EVENT = Receiving, S
IZE = 143, SOURCE = localhost:19780, DESTINATION = localhost>
failed to create udp packet
java.io.FileNotFoundException: c:\temp\udppacket.13.bin (The system cannot find
the path specified)
<Tue Dec 23 13:32:01 IST 2008>: [35] :<DEBUG>:<LAYER = UDP, EVENT = Sending, SIZ
E = 11, SOURCE = , DESTINATION = localhost:19780>
<Tue Dec 23 13:32:01 IST 2008>: [36] :<DEBUG>:<LAYER = CMIME, Sending message fr
om device...>
<Tue Dec 23 13:32:01 IST 2008>: [37] :<DEBUG>:<LAYER = CMIME, SENSITIVITY: NORMA
L>
<Tue Dec 23 13:32:01 IST 2008>: [38] :<DEBUG>:<LAYER = CMIME, RIM_MESSAGE_LANGUA
GE_ID: enGB>
<Tue Dec 23 13:32:01 IST 2008>: [39] :<DEBUG>:<LAYER = CMIME, CMIME_IMPORTANCE:
NORMAL>
<Tue Dec 23 13:32:01 IST 2008>: [40] :<DEBUG>:<LAYER = CMIME, SUBJECT: Test5>
<Tue Dec 23 13:32:01 IST 2008>: [41] :<DEBUG>:<LAYER = CMIME, TO: chathura_dd@de
vinda.com>
<Tue Dec 23 13:32:01 IST 2008>: [42] :<DEBUG>:<LAYER = CMIME, MESSAGE_REFERENCE_
ID: 1769253247>
<Tue Dec 23 13:32:01 IST 2008>: [43] :<DEBUG>:<LAYER = CMIME, FROM: 2100000A>
<Tue Dec 23 13:32:01 IST 2008>: [44] :<DEBUG>:<LAYER = CMIME, DATE: Tue Dec 23 1
3:32:01 IST 2008>
<Tue Dec 23 13:32:01 IST 2008>: [45] :<DEBUG>:<LAYER = CMIME, RIM_MESSAGE_TYPE:
2>
<Tue Dec 23 13:32:01 IST 2008>: [46] :<DEBUG>:<LAYER = CMIME, CONTENT_TYPE: 2>
<Tue Dec 23 13:32:01 IST 2008>: [47] :<DEBUG>:<LAYER = CMIME, Media subtype: 1>
<Tue Dec 23 13:32:01 IST 2008>: [48] :<DEBUG>:<LAYER = CMIME, CONTENT: Msg5>
<Tue Dec 23 13:32:01 IST 2008>: [49] :<DEBUG>:<LAYER = CMIME, Sending email message>

 

Then when tried access the POP3 server..ie when i tried to open the inbox in OutLook the command prompt showed the following...

 

<Tue Dec 23 13:36:51 IST 2008>: [50] :<DEBUG>:<LAYER = ESS, POP3.ClientConnectin
g:127.0.0.1>
<Tue Dec 23 13:36:51 IST 2008>: [51] :<DEBUG>:<LAYER = ESS, POP3.WaitingForClien
t>
<Tue Dec 23 13:36:51 IST 2008>: [52] :<ERROR>:<LAYER = ESS, java.net.SocketExcep
tion: Software caused connection abort: socket write error>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<LAYER = ESS, EVENT = Exception, S
oftware caused connection abort: socket write error
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<java.net.SocketException: Softwar
e caused connection abort: socket write error>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at java.net.SocketOutputStream.so
cketWrite0(Native Method)>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at java.net.SocketOutputStream.so
cketWrite(SocketOutputStream.java:92)>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at java.net.SocketOutputStream.wr
ite(SocketOutputStream.java:136)>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at sun.nio.cs.StreamEncoder.write
Bytes(StreamEncoder.java:202)>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at sun.nio.cs.StreamEncoder.implF
lushBuffer(StreamEncoder.java:272)>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at sun.nio.cs.StreamEncoder.implF
lush(StreamEncoder.java:276)>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at sun.nio.cs.StreamEncoder.flush
(StreamEncoder.java:122)>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at java.io.OutputStreamWriter.flu
sh(OutputStreamWriter.java:212)>
<Tue Dec 23 13:36:51 IST 2008>: [53] :<ERROR>:<at net.rim.mailboxwatcher.vvxw.ru
n(Unknown Source)>

 

How can resolve this issue? Your ideas are highly appreciated..

 

Thanks

Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: sending an image through email..

I am sorry, but I am too busy now, and it is not possible for me to dig deep into this issue.

 

Please ask for help to other forum users. There are good experts and I hope they will help you.

Developer
chathuradd
Posts: 28
Registered: ‎12-18-2008
My Device: Not Specified

Re: sending an image through email..

Anyway thanks for your response...

Finally I got it resolved.. I'm also not quite sure what was the reason. However I removed all my network connections and disabled virus guard and firewall. And it worked. But importantly after that I enabled all the stuff and tried again. This time it continued to work...

 

 

Developer
Shubhangi
Posts: 97
Registered: ‎07-17-2008
My Device: Not Specified

Re: sending an image through email..

Hi,

 

When we send the message(email), if message sending fails what are the message status?

 

Following I found in APIs:

Category: SignedTX_ERROR
Indicates a tranmission error.

TX_GENERAL_FAILURE
Indicates a general transmission failure.

 

Are there more status to indicate that message sending is failed?

 

Is there any different message status for "Failed to send-packet error"?

 

Regards,

Shubhangi