XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum [Powered by Invision Power Board]
Printable Version of Topic
Click here to view this topic in its original format
XMail Forum > Webmail Add-ons > jsp web mail?


Posted by: arbibo Aug 25 2003, 04:04 AM
I saw 4 or 5 web mail in PHP or Perl version for xmail. Just wounder is any jsp version or any tips if I do need build one?
Thanks

Posted by: hschneider Aug 25 2003, 12:28 PM
Just go straight ahead. XMail does not differ from any ohter SMTP or POP server concerning webmail as long as you access its data by SMTP and POP3 protocol.

Every generic .jsp solution should work with XMail.

Posted by: arbibo Aug 26 2003, 03:27 AM
I read the class in detail for the XPAI webmail and I like the idea of the class. I have question that "telnet localhost 6017".

As you see it is telnet into xmail thought 6017 and call the command. Anyone know how to "telnet" using JSP?

In Php, there is a function like.
//connection to Xmail
$fp = fsockopen($this->xm_ip, $this->xm_port, $errno, $this->xm_err_msg, 10);



I think after I can succefully telnet and connect to Xmail using JSP. the rest will be easy since it just execute command and rerturn the result.

Thanks

Posted by: hschneider Aug 26 2003, 06:21 AM
As far as I know, JSP does not support raw sockets. You need to access'em in another language.

Posted by: Aram Aug 26 2003, 09:31 PM
I found the following code in my archive. Looks like all that you need.

QUOTE

// tcpClient.java

// usage : java tcpClient <server> <port>
// default port is 1500

import java.net.*;
import java.io.*;

public class tcpClient {
   
   
   
    public static void main(String[] args) {

int port = 1500;
String server = "localhost";
Socket socket = null;
String lineToBeSent;
BufferedReader input;
PrintWriter output;
int ERROR = 1;

// read arguments
if(args.length == 2) {
    server = args[0];
    try {
  port = Integer.parseInt(args[1]);
    }
    catch (Exception e) {
  System.out.println("server port = 1500 (default)");
  port = 1500;
    }
}



// connect to server
try {
    socket = new Socket(server, port);
    System.out.println("Connected with server " +
      socket.getInetAddress() +
      ":" + socket.getPort());
}
catch (UnknownHostException e) {
    System.out.println(e);
    System.exit(ERROR);
}
catch (IOException e) {
    System.out.println(e);
    System.exit(ERROR);
}



try {
    input = new BufferedReader(new InputStreamReader(System.in));
    output = new PrintWriter(socket.getOutputStream(),true);
   
    // get user input and transmit it to server
    while(true) {
  lineToBeSent = input.readLine();
  // stop if input line is "."
  if(lineToBeSent.equals(".")) break;
  output.println(lineToBeSent);
    }
}
catch (IOException e) {
    System.out.println(e);
}

try {
    socket.close();
}
catch (IOException e) {
    System.out.println(e);
}
    }   
}


Posted by: roguecoolman Sep 3 2003, 04:28 PM
Hi there,

sorry for intruding on the thread,

but I saw this sometime ago:

http://openwebmail.com/openwebmail/


does it work for xmail?

I read a bit of the site and only mentions sendmail and qpopper.

it looks like a neat to access my mail via web interface.


Posted by: hschneider Sep 3 2003, 04:42 PM
Sticking to its requierements, it should work with ANY SMTP/POP server:

QUOTE

REQUIREMENT
-----------
Apache web server with cgi enabled
Perl 5.005 or above

CGI.pm-2.74.tar.gz        (required)
MIME-Base64-2.12.tar.gz  (required)
libnet-1.0901.tar.gz      (required)
Text-Iconv-1.2.tar.gz    (required)
libiconv-1.8.tar.gz      (required if system doesn't support iconv)

CGI-SpeedyCGI-2.21.tar.gz (optional)
Compress-Zlib-1.21.tar.gz (optional)
ispell-3.1.20.tar.gz      (optional)
Quota-1.4.6.tar.gz        (optional)
Authen-PAM-0.12.tar.gz    (optional)
ImageMagick-5.5.3.tar.gz  (optional)


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)