×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    2

    J2ME & SMTP servers

    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
    Join Date
    Apr 2004
    Posts
    89

    Authentication

    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
  •  
×