You Are Here:

Community: Developer Discussion Boards

#1 Old J2ME & SMTP servers - 2003-04-14, 18:50

Join Date: Apr 2003
Posts: 2
vacca.m
Offline
Registered User
Hi, I am new to J2ME and I am developing an application that implements a simple SMTP client using the socket protocol to send an e-mail. Here the code to create the connection:

StreamConnection socket = (StreamConnection)Connector.open("socket://smtpserver:25", Connector.READ_WRITE, true);
InputStream input = socket.openInputStream();
OutputStream output = socket.openOutputStream();

The InputStream.read(byte[], int, int) method is used to read data and the OutputStream.write(byte[], int, int) to send data.

When I run the app on the emulator, all works fine. Welcome mgs received from the server, HELO cmd sended and the response correctly received, ecc...

When the app runs on a Nokia 3650 device, it correctly receives data from the server (ie. the welcome msg) but when it sends the HELO cmd, no response was received and, after some minutes, the device receives the error msg "451 Timeout waiting for client input"

What could be the reason for this strange behaviour? How can I solve this problem?
Thanks, Massimo
Reply With Quote

#2 Old Authentication - 2005-01-27, 07:16

Join Date: Apr 2004
Posts: 88
jig22nesh's Avatar
jig22nesh
Offline
Regular Contributor
Hi..
I read your code..
Bt my server requires authentication..

So how can i send USRE name and PAssword

Let me know please

Jignesh
jig2nesh@hotmail.com
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia