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
New Developer
BlakberryNewbie
Posts: 35
Registered: ‎09-11-2008
My Device: Not Specified

Cannot send email TO BlackBerry simulator with ESS

Hi, I am a new BlackBerry developer here and am trying to run the simulators. I have the JDE 4.6 along with the ESS that comes bundled with it. I am trying to send email to and from the BlackBerry Simulator. I am able to successfully send email FROM the simulator to my Eudora 7 client through the ESS. However, when I try to send email from the client TO the BlackBerry simulator, it fails and I get a "503 No sender" error in the client. I have the correct POP3 and SMTP ports set to 110 and 25, respectively, as well as the client POP3 and SMTP servers set to "localhost". What is wrong here?
Please use plain text.
Administrator
MSohm
Posts: 14,521
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Cannot send email TO BlackBerry simulator with ESS

This is caused by your virus scanner.  Please see this link for details.

 

Support - Error 503 when sending messages from an email client to the Email Server Simulator
Article Number: DB-00391

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800792/800982/Support...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
sweetsweet24
Posts: 24
Registered: ‎09-04-2008
My Device: Not Specified

Re: Cannot send email TO BlackBerry simulator with ESS

Can I send mail with photo attachment in the simulator? Because I tried to use the camera and used the send photo icon in the simulator, but i cannot send the photo.

 

Please tell me the way to send the photo from simulator. I am a newbie developer.

Please use plain text.
New Developer
BlakberryNewbie
Posts: 35
Registered: ‎09-11-2008
My Device: Not Specified

Re: Cannot send email TO BlackBerry simulator with ESS

Mark,

   I went to the following link: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800792/800982/Support...

 

That solution did not seem to solve the problem. I went so far as to disable my Symantec AntiVirus completely to see if that would change the behavior. There was no change. I still get teh 503 error in Eudora. I also checked the status in the ESS status window when I tried to send email from Eudora to the BlackBerry Simulator and this is what it reported:

 

"<Fri Sep 12 10:17:42 EDT 2008>: [24] :<DEBUG>:<LAYER = ESS, SMTPServer.ClientConnecting:127.0.0.1>

 <Fri Sep 12 10:17:42 EDT 2008>: [24] :<DEBUG>:<LAYER = ESS, SMTPServer.WaitingForClient>"

 

Is there something else I must do? There were very few if any instructions on BlackBerry's website in how to run certain aspects of the ESS, namely, clicking on "Load Test". I am assuming I have to use this. Nothing is editable in the Load Test window and it isn't exactly clear how one is supposed to select a message for load test in the text field. When I click on "Start", I get a Java null pointer exception in the ESS status window. Any further help you may have is greatly appreciated. Thanks.

Please use plain text.
Administrator
MSohm
Posts: 14,521
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Cannot send email TO BlackBerry simulator with ESS

To simulate sending and receiving email, you should use the launch button of the ESS, not Load test.

 

When you get the NullPointerException, are you running the ESS in Standalone or Connected mode?  Have you filled out the Name and Email fields?  If you are using connected, have you filled out the fields for your mail server in the Connected Mode section?

 

This link explains how to use the ESS in stand alone mode.

 

How to - Send and receive email messages through the BlackBerry Email Server Simulator in standalone mode 
Article Number: DB-00576

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800792/800982/How_to_...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
BlakberryNewbie
Posts: 35
Registered: ‎09-11-2008
My Device: Not Specified

Re: Cannot send email TO BlackBerry simulator with ESS

Mark,

   I am running the ESS ONLY in standalone mode, and I have been using only the launch button so far. I clicked on the Load Test button because nothing else seemed to work, in terms of getting email sent TO the BlackBerry Device Simulator from the Eudora email client. I have correctly filled out the name and email fields in BOTH the email client and the BlackBerry Device Simulator. I set both the SMTP and POP3 servers to "localhost", using the defaults ports of 110 and 25. Again, I am able to send email from the BB Device Simulator to the Eudora email client, but the reverse is not possible for some reason. I have checked the configuration over and over again and have set it up exactly as the documentation has stated. As a side note, what is the "Load Test" button for anyway?

 

 

Please use plain text.
Administrator
MSohm
Posts: 14,521
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Cannot send email TO BlackBerry simulator with ESS

What action do you take that triggers the NullPointerException?  Does this happen at the same time as the 503 error?

 

The load test just sends the same message X number of times.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
sweetsweet24
Posts: 24
Registered: ‎09-04-2008
My Device: Not Specified

Re: Cannot send email TO BlackBerry simulator with ESS

Hi Mark!

I want to take the photo from phone camera and after taking that photo(Photo size is 59KB) i want to programmatically send that photo with attachment from the email. I can send the file (html) with attachment(i got that sample from how to create email sample at knowledge base). So i can send that file successfully. so I tried to send the photo using that program. My program doesn't show any error message and at first it look like waiting status and then after 5 minutes it show cross sign(cannot send). I used the ESS at connection mode. And I used the Simulator version 4.6 and Email Server simulator version 4.6  I can send other message successfully.So Please tell me what is worng with my program. 

This is the part of my program.

 

  Bitmap image = Bitmap.createBitmapFromBytes( _raw, 0, -1, IMAGE_SCALING );
                           
                            int height=(int)(image.getHeight()*0.5);
                            int width=(int)(image.getWidth()*0.5);
                            int[] rgbdata = new int[width*height];
                            ByteArrayOutputStream bos = new ByteArrayOutputStream();
                            DataOutputStream dos = new DataOutputStream(bos);
                            for (int i = 0; i < rgbdata.length ; i++) {
                                if (rgbdata[i] != -1) {
                                    dos.writeInt(i);
                                    dos.flush();
                                    //l++;
                                    }
                                 }
                             bos.flush();
                            bos.toByteArray();

                                String filename=FILE_NAME + _counter + EXTENSION;
                                Multipart mp = new Multipart();
                                SupportedAttachmentPart sap = new SupportedAttachmentPart(mp,"image/bmp",filename,_raw);
                                String a=Integer.toString(_raw.length);
                                Dialog.inform(a);
                                TextBodyPart tbp = new TextBodyPart(mp,"Send Image");
                                mp.addBodyPart(tbp);
                                mp.addBodyPart(sap);
                               
                                Folder folders[] = Session.getDefaultInstance().getStore().list(Folder.SENT);
                               
                                Message message = new Message(folders[0]);    
                                try {
                                    Address toAdd = new Address("sweetsweet.khaing@gmail.com","my email");
                                    Address toAdds[] = new Address[1];
                                    toAdds[0] = toAdd;
                                   message.addRecipients(Message.RecipientType.TO,toAdds);
                                    message.setContent(mp);

                                    Transport.send(message);
                               } catch (Exception e) {
                                    Dialog.inform(e.toString());
                               }

 

Please use plain text.
New Developer
BlakberryNewbie
Posts: 35
Registered: ‎09-11-2008
My Device: Not Specified

Re: Cannot send email TO BlackBerry simulator with ESS

Mark,

   I don't the NullPointerException with teh 503 error. I get the 503 error the moment I click send from the Eudora email client. The NullPointerException comes when I click the "start" button off off the GUI that pops up from the "Load Test" window.

Please use plain text.
Administrator
MSohm
Posts: 14,521
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Cannot send email TO BlackBerry simulator with ESS

Do you have any other virus scanner or any sort of plug-in for Eudora that scans the email for a virus?  The 503 error typically comes from an online scanner that is unable to connect to the ESS (it can't talk to the "localhost" mail server on your PC).

 

Regarding the red X, please open the message and check the message status on the top of the screen.  The ESS does not have the same support for email attachments that a BlackBerry Enterprise Server or the BlackBerry Internet Service does.  Are you seeing the same issue when using an actual BlackBerry?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.