Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User vacca.m's Avatar
    Join Date
    Apr 2003
    Posts
    2
    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

  2. #2
    Regular Contributor jig22nesh's Avatar
    Join Date
    Apr 2004
    Posts
    89
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved