dcsimg
How to get the mail inbox for users having accounts in Domino mail server through java???
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sanju_thakur
Posted On:   Tuesday, July 9, 2002 02:49 AM

my problem is the String url for the domino mail server to access directly is http://ipaddress:81/mail/username.nsf when you type this in a browser it gives a pop up window for authentication now I want to eliminate this popup window by passing the username & password from my jsp file here is the code which i was trying <%@ page import="java.io.*,java.net.*,com.Ostermiller.util.*" %> <% String url="http://192.168.1.11:81/mail/shailesh.nsf"; String user="shailesh"; String pass="password"; String enc=Base64.encode(user)+":"   More>>

my problem is the String url for the domino mail server to access directly is



http://ipaddress:81/mail/username.nsf



when you type this in a browser it gives a pop up window for authentication

now I want to eliminate this popup window by passing the username & password from my jsp file




here is the code which i was trying


<%@
page import="java.io.*,java.net.*,com.Ostermiller.util.*"
%>


<%
String url="http://192.168.1.11:81/mail/shailesh.nsf";

String user="shailesh";

String pass="password";

String enc=Base64.encode(user)+":"+Base64.encode(pass);

//String enc=user+":"+pass;

URL myurl=new URL(url);

URLConnection ucon=myurl.openConnection();

ucon.setRequestProperty("Authorization",enc);

InputStream io=ucon.getInputStream();

BufferedReader buff=new BufferedReader(new InputStreamReader(io));

String temp="";

do

{

temp=buff.readLine();

if(temp!=null)

{

out.println(temp);

}

}while(temp!=null);

buff.close();

out.flush();

out.close();

%>

   <<Less

Re: How to get the mail inbox for users having accounts in Domino mail server through java???

Posted By:   Gautam_Marwaha  
Posted On:   Tuesday, July 9, 2002 04:31 AM

Domino supports IMAP so why not use this to access a user's mailbox? Sample code for using IMAP is available with JavaMail distribution (available from http://java.sun.com/products/javamail)
About | Sitemap | Contact