Error while connecting to Microsoft Exchange server using javamail: "com.sun.mail.util.MailConnectException: Couldn't connect to host, port: host name , 993; timeout -1"
I am trying to read mails from my outlook microsoft exchange server. Following is the code:
public void readEmailsFromOutlook(/*String host, String username, String password*/ ) throws MessagingException, IOException {
String host = "hostname";
String username = "domain\\username";
String password = "password"
// Create empty properties
Properties props = System.getProperties();
props.setProperty("mail.smtp.auth","true");
props.setProperty("mail.store.protocol","imaps");
props.setProperty("mail.imap.auth.plain.disable","true");
props.setProperty("mail.imap.host",host);
props.setProperty("mail.imap.port","993");
props.setProperty("mail.imap.user",username);
props.setProperty("mail.imap.pwd",password);
props.setProperty("mail.imap.debug","true");
props.setProperty("mail.imap.ssl.protocols","SSL");
props.setProperty("mail.imap.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.setProperty("mail.imap.socketFactory.fallback", "false");
props.setProperty("mail.imap.socketFactory.port", "993");
// Get session
Session session = Session.getInstance(props, new ExchangeAuthenticator(username, password));
session.setDebug(true);
// Get the store
Store store = session.getStore("imaps");
//Store store = session.getStore();
store.connect(host, username, password);
// Get folder
Folder folder = store.getFolder("INBOX");
folder.open(Folder.READ_ONLY);
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
// Get directory
Message message[] = folder.getMessages();
for (int i = 0, n = message.length; i < n; i++) {
System.out.println(i + ": " + message[i].getFrom()[0] + "\t"
+ message[i].getSubject());
System.out.println("Read message? [YES to read/QUIT to end]");
String line = reader.readLine();
if ("YES".equalsIgnoreCase(line)) {
System.out.println(message[i].getContent());
} else if ("QUIT".equalsIgnoreCase(line)) {
break;
// Close connection
folder.close(false);
store.close();
But it threw the following error:
DEBUG: setDebug: JavaMail version 1.5.1
DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle]
DEBUG IMAPS: mail.imap.fetchsize: 16384
DEBUG IMAPS: mail.imap.ignorebodystructuresize: false
DEBUG IMAPS: mail.imap.statuscachetimeout: 1000
DEBUG IMAPS: mail.imap.appendbuffersize: -1
DEBUG IMAPS: mail.imap.minidletime: 10
DEBUG IMAPS: trying to connect to host <hostname>,port 993, isSSL true
com.sun.mail.util.MailConnectException: Couldn't connect to host, port: 10.75.250.60, 993; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:693)
at javax.mail.Service.connect(Service.java:345)
at javax.mail.Service.connect(Service.java:226)
at com.capgemini.utilities.Utilities.readEmailsFromOutlook(Utilities.java:1261)
Whats wrong with my code?
Please help!!!!
You're using the "imaps" protocol, but you've set properties for the "imap" protocol. Change all the property names from mail.imap.* to mail.imaps.*.
Also, get rid of all the socket factory properties.
If you still can't connect, see these connection debugging tips.
Most likely you're using the wrong host name or port number. In almost all cases, it's better to just let JavaMail choose the correct port number.
Similar Messages
-
Unable to connect to the Exchange server using HTTP/HTTPS protocol.
hi,
i try to connect microsoft exchange server, but it give me
error
Unable to connect to the Exchange server using HTTP/HTTPS
protocol.
my code is pasted below............
<!--- connection parameters --->
<cfparam name="user1" default="uHRH">
<cfparam name="user2" default="uHRH">
<cfparam name="password" default="uHRH">
<cfparam name="exchangeServerIP" default="192.168.0.1">
<cftry>
<!--- Open a connection to the exchange server by
specifying the required user credentials --->
<cfexchangeConnection
action="open"
username ="#user1#"
password="#password#"
server="#exchangeServerIP#"
<!--- protocol = "http"--->
connection="conn1">
<cfoutput>Connection to exchange server
"#exchangeServerIP#" established</cfoutput>
<!--- Close connection to exchange server --->
<CFExchangeConnection
action="close"
connection="conn1">
<cfoutput>Connection to exchange server
"#exchangeServerIP#" terminated</cfoutput>
<!--- Error Information --->
<cfcatch type="any">
<cfoutput>#cfcatch.message#</cfoutput>
</cfcatch>
</cftry>
if any one know how to solve this error?Hi,
The "<cfexchangeConnection>" tag supports both "HTTP"
and "HTTPS" connection.. So Please make sure the username has the
"Outlook Web Access".
Also try removing the <!--- protocol = "http"--->
comment which you placed inside the "<cfexchangeConnection>"
tag. -
Why do I get the message "cannot get mail" when trying to connect to ms exchange server?
Hard to say. Has it ever worked? Maybe your account has mobile e-mail disabled. Maybe ActiveSync isn't set up properly on the server. maybe the correct ports are not open on the corporate firewall.
You will have to talk to your IT department. -
I'm a corporate user with a very large company that is using Microsoft Hosted Exchange services actually hosted by Microsoft employees at their facilities. I called Palm support and they were clueless and zero help. The lady pointed me to some Palm KB article that I had already read and only remotely had anything to do with my problem. I see nothing on this error message in the forums and google searches. Sprint has even replaced my palm pre due to other reasons and the same error occurs after I configure the exchange account. I'm also seeing the error when I configure my account on my wifes brand new pixi. Both our pre and pixi already have exchange accounts successfully configured on our phones that are hosted by sherweb. The sherweb exchange accounts work without issue. I have tried configuring this microsoft hosted exchange account 5-6 times with the same result. It accepts my configuration information and adds it to the list of available email accounts in the pre. However, it keeps popping up this message stating "Security policy error: "Exchange... Tap for details" (with a yellow exclamation mark). Then it says "Security Policy Error" The account Exchange (first part of my email address) is disabled because security policies cannot be set." "Leave it disabled" or "Remove Account". I know something is working because it enforced a Password or Pin policy on to my phone which is not required unless this account has been added. I can also see it in the "Mobile Devices" section of web outlook when I login. This is the place in web outlook where you can see the last time the device synced, where you can remote wipe the phone etc. If anyone has any idea how to resolve my issue please post. Any ideas? I'm fresh out of ideas on this problem and very frustrated with Palm Developers. Just another example of poor development and testing practices by Palm. I hope they correct this issue on subsequent releases but I am only marginally optimistic that they will ever get this exchange mail support to the level necessary to support large corporations. What I do know is that my Microsoft Hosted Exchange account works fine on a Windows Mobile phone and a iPhone 3GS (confirmed by other coworks who have configured their phones using our exchange services). As a result, I have no choice but to blame Palm for this problem instead of Microsoft. Palm please fully support microsoft exchange mail users!!!!
Post relates to: Pre p100eww (Sprint)
This question was solved.
View Solution.From my understanding of EAS and PDA devices, if the server as a policy to enforce and the device cannot provide that policy then the server will not allow the device to connect. The KB I gave you has a listing of what policies the devices supports, if your server supports more than that then it could deny the connection. As for what the iPhone does and does not do we cannot answer that due to we are not iPhone.
I did find an article that may explain a little better for PDA and exchange: http://www.infoworld.com/d/mobilize/how-avoid-smartphone-exchange-policy-lie-004 -
Calendar Connectivity with Microsoft Exchange Server
Hi Everybody,
We want to use Calendar scheduling activity of Micrsoft Exchange Server in NW Portal Version 7 SP9. However we are stuck up with the following problem.
The Scenario is like:
1)The IIS Server and MS Exchange Server are in same domain.
2)MSX-A component has been /copied installed on IIS Server 5.
3)DLL registered.
4)We are using MS Oultook 2003 and Exchange Server 2003.
5)An IIS website has been created following the guidelines from a PDF document( Its wihtout SSO).
6)Logon Locally permissions given to all users.
When the CDO Version test is executed the common error "Microsoft Outlook not configured for Corporate/Work group access. Reconfigure MS Outlook and try again" is thrown.
As per the information from sdn only MS Outlook 2000 needs to be configured for this.
When the Data Retrieval test is executed an error message "CDO MAPI_E_NOT_INITIALIZED(80040605)" is shown.
Please share your views on this situation.
Suresh YadavIf I were you, I would create an OSS customer message for this.
Maybe a quick fix though... Have you installed Outlook 2003 on the same server as IIS is running on? Have you run outlook at least once and connected it to your Exchange server, setting it as the default mail client?
Also, there is a note about what to do for exchange transports when you do a portal patch. Applying those steps might be a good idea even if you have not done an upgrade.
Good Luck.
Regards,
Graham. -
Error In Re-install Microsoft Exchange Server 2010
Hi
Ihad Installed Ms Exchange Server 2K10 and work correctly.
I Did somne mistake and I had to uninstall and re-install that
but when I try to install that there are many Errors Apears.
Mentioned : when I was uninstall exchnage I delete Every Thing In Active Directory Users and computers
Errors:-----------
Elapsed time: 00:00:27
Organization Prerequisites
Failed
Error:
The Exchange organization does not support this version of Exchange Server.
Warning:
Setup is going to prepare the organization for Exchange 2010 by using 'Setup /PrepareAD'. No Exchange 2007 server roles have been detected in this topology. After this operation, you will not be able to install any Exchange 2007 server roles.
Elapsed Time: 00:00:19
Languages Prerequisites
Completed
Elapsed Time: 00:00:01
Hub Transport Role Prerequisites
Failed
Error:
The Exchange organization does not support this version of Exchange Server.
Error:
Setup cannot continue because one or more SMTP/Send connectors have invalid settings: Couldn't find the Enterprise Organization container.
Client Access Role Prerequisites
Failed
Error:
The Exchange organization does not support this version of Exchange Server.
Elapsed Time: 00:00:01
Mailbox Role Prerequisites
Failed
Error:
The Exchange organization does not support this version of Exchange Server.
Elapsed Time: 00:00:01check out is there any watermark key in the registry - A watermark in the registry identifies where Setup failed. You will not have to answer the Exchange 2010 Setup wizard questions again when you resume a failed Setup. You can resume the failed install,
and let it succeed.
A few article for more understanding
http://technet.microsoft.com/en-us/library/ff805039%28v=exchg.141%29.aspx
http://blogs.technet.com/b/exchange/archive/2007/05/21/3402900.aspx
Exchange Queries -
Errors while migrating from Microsoft SQL Server 2005 to Oracle 9i
Hi All,
We are trying to completely move our application from Microsoft SQL Server 2005 Database to Oracle 9i. I am doing it using the latest version of Oracle SQL Developer (1.2 build 29.98).
When I right click my MSSQL server db and click "Capture Microsoft SQL server", it just shows a dialog with "Close" enabled.
Kindly help.
The migration Log has the following messages:
oracle.dbtools.metadata.persistence.PersistenceException: Unsupported feature
oracle.dbtools.metadata.persistence.PersistenceException: Unsupported feature
oracle.dbtools.metadata.persistence.PersistenceException: OALL8 is in an inconsistent state
oracle.dbtools.metadata.persistence.PersistenceException: Protocol violation
oracle.dbtools.metadata.persistence.PersistenceException: OALL8 is in an inconsistent state
oracle.dbtools.metadata.persistence.PersistenceException: Protocol violation
oracle.dbtools.metadata.persistence.PersistenceException: OALL8 is in an inconsistent state
oracle.dbtools.metadata.persistence.PersistenceException: Protocol violation
oracle.dbtools.metadata.persistence.PersistenceException: OALL8 is in an inconsistent state
oracle.dbtools.metadata.persistence.PersistenceException: Bigger type length than Maximum
oracle.dbtools.metadata.persistence.PersistenceException: Bigger type length than Maximum
oracle.dbtools.metadata.persistence.PersistenceException: OALL8 is in an inconsistent state
Error ocurred during capture: Protocol violation
oracle.dbtools.metadata.persistence.PersistenceException: OALL8 is in an inconsistent state
oracle.dbtools.metadata.persistence.PersistenceException: Protocol violation
oracle.dbtools.metadata.persistence.PersistenceException: OALL8 is in an inconsistent state
oracle.dbtools.metadata.persistence.PersistenceException: Protocol violation
oracle.dbtools.metadata.persistence.PersistenceException: OALL8 is in an inconsistent state
oracle.dbtools.metadata.persistence.PersistenceException: Bigger type length than Maximum
I cant figure out what do these messages mean.
Regards,
SandeepPasting the errors on logging page, if this is of any help:
SEVERE 150 0 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:OALL8 is in an inconsistent state
SEVERE 151 1485 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:Protocol violation
SEVERE 152 15 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:OALL8 is in an inconsistent state
SEVERE 153 10954 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:Protocol violation
SEVERE 154 15 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:OALL8 is in an inconsistent state
SEVERE 155 2688 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:Protocol violation
SEVERE 156 1140 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:OALL8 is in an inconsistent state
SEVERE 158 62172 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:OALL8 is in an inconsistent state
SEVERE 160 3672 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:Protocol violation
SEVERE 161 63 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:OALL8 is in an inconsistent state
SEVERE 162 0 oracle.dbtools.raptor.utils.NLSUtils Error loading nls:Protocol violation -
Using Microsoft Exchange Server in SOA Suite
Hi Gurus,
I want to use Microsoft Exchange Server for sending email notifications in SOA Suite.
I tried connecting to my company( Exchange Server) SMTP name and port no but its failing with all options ( SSL, TSL , NONE).I even tested with OSB, adding SMTP server and sending mail using Business Service but it's failing
I have tested with Apache James and Gmail as email server and it works fine,but problem comes when in want to configure it with company Exchange Server
Did any one have configured/tried connecting to Microsoft Exchange Server using SOA Suite. Please provide your inputs.
Socket Excpetion while sending emails in 11g
says Oracle UMS does not works with Microsoft Exchange Server and we need to replace some jars.
Please suggest !!
Regards,
Abhinav GuptaHi Neeraj,
for OutgoingMailServerSecurity : TLS
*******error*****
******** in Email Driver Logs *********
javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1564)
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1551)
at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:935)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:426)
at javax.mail.Service.connect(Service.java:310)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at oracle.sdpinternal.messaging.driver.email.EmailDriver.send(EmailDriver.java:780)
at oracle.sdpinternal.messaging.driver.email.EmailManagedConnection.send(EmailManagedConnection.java:50)
at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
*****IN console Logs *******
Jun 25, 2012 3:45:36 PM IST> <Error> <oracle.soa.services.notification> <BEA-00
0000> <<.> Error status received from UMS.
Status detail :
Status type : DELIVERY_TO_GATEWAY:FAILURE,
Status Content : javax.mail.MessagingException: Can't send command to S
MTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorExc
eption: PKIX path building failed: sun.security.provider.certpath.SunCertPathBui
lderException: unable to find valid certification path to requested target,
Addressed to : EMAIL:abhinav.gupta@*********.com,
UMS Driver : Farm_base_domain/base_domain/AdminServer/usermessagingdriv
er-email:oracle_sdpmessagingdriver_email#Email-Driver,
UMS Message Id : 23239c4f0ac0064b017335c74f86a8e9,
Gateway message Id : ****.outlook.com:[email protected]@*******.com,
Status Received at : Mon Jun 25 15:45:34 IST 2012.
Check status details and fix the underlying reason, which caused error.
>
********error *******
for OutgoingMailServerSecurity : NONE
*******error*****
******** in Email Driver Logs *********
javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at oracle.sdpinternal.messaging.driver.email.EmailDriver.send(EmailDriver.java:781)
at oracle.sdpinternal.messaging.driver.email.EmailManagedConnection.send(EmailManagedConnection.java:50)
at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
*****IN console Logs *******
<Jun 25, 2012 3:57:10 PM IST> <Error> <oracle.soa.services.notification> <BEA-00
0000> <<.> Error status received from UMS.
Status detail :
Status type : DELIVERY_TO_GATEWAY:FAILURE,
Status Content : javax.mail.MessagingException: [EOF],
Addressed to : EMAIL:abhinav.gupta@*****.com,
UMS Driver : Farm_base_domain/base_domain/AdminServer/usermessagingdriv
er-email:oracle_sdpmessagingdriver_email#Email-Driver,
UMS Message Id : 232e2ab70ac0064b01cd6ee979e494ed,
Gateway message Id : ****.outlook.com:[email protected].******.com,
Status Received at : Mon Jun 25 15:57:04 IST 2012.
Check status details and fix the underlying reason, which caused error.
*******error*****
Please suggest me what to do !! I am stuck with it for last two days !! -
Problem to access POP3 of MS Exchange Server using Java Mail
{color:#0000ff}Hi,
I have a requirement to read emails from my office mailbox using POP3 protocol which is in Microsoft Exchange Server.
My code is given below.{color}
{color:#0000ff}*package emailadaptor;*
import java.util.Properties;
import javax.mail.Session;
import javax.mail.Store;
*public class Test {*
*public static void main(String[] args) {*
* // POP3 server name of Exchange Server*
* String host = "popServer.domain.com";*{color}
{color:#0000ff}*
* // User name*
* String user = "domainName\\userName";*
* String password = "password";
* // Get a session. Use a blank Properties object.*
* Session session = Session.getDefaultInstance(new Properties());
* try{*
* // Get a Store object*
* Store store = session.getStore("pop3");*
* store.connect(host, user, password);*
* }catch(Exception e){*
* e.printStackTrace();*
*{color:#0000ff}I can ping popServer.domain.com from my machine where I am testing the code.*
For username I have tried with domainName\\userName and username pattern both but unsuccessful. For example if my username if user1 and my domain name is domain1 than the two patterns I have tried are ‘domain1\\user1’ and ‘user1’.
For both these cases I am getting same error, and below is my error stack Trace.
*{color}*
*{color:#ff0000}javax.mail.AuthenticationFailedException: The requested mailbox is not available on this server.*
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:158)
at javax.mail.Service.connect(Service.java:291)
at javax.mail.Service.connect(Service.java:172)
at emailadaptor.Test.main(Test.java:19)
*{color}*
*{color:#0000ff}Please give me some idea and steps what is wrong with this code and if any other information is needed then also let me know that.*
Please help.
Regards,
*Gourab{color}
*{color}Turn on session debugging. What does the protocol trace show?
Are you able to connect with other mail clients, such as Thunderbird?
(Outlook doesn't count.) -
HI, Iam trying to Integrate Exchange server using Java Mail
Here is what iam stuck with, I have a problem while conneting to Exchange Server using imap over ssl.
My code looks like this
props.put("mail.imap.host",host);
props.put("mail.imap.sasl.authorizationid","user1");
props.put("mail.imap.sasl.enable","true");
props.setProperty("mail.imap.socketFactory.class","javax.net.ssl.SSLSocketFactory");
props.setProperty("mail.imap.socketFactory.fallback","true");
props.setProperty("mail.imap.socketFactory.port","993");
Authenticator auth = new myauthenticator(AdminUserName,AdminPassword);
Session session = Session.getInstance(props,auth);
session.setDubug(true);
Store store = session.getStore("imap");
store.connect();
I get the following Exception as
javax.mail.MessagingException: Software caused connection abort: recv failed;
nested exception is:
java.net.SocketException: Software caused connection abort: recv failed
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:571)
at javax.mail.Service.connect(Service.java:310)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at MoveCalendar.move(MoveCalendar.java:63)
at SendCalendar.send(SendCalendar.java:74)
at SendCalendar.main(SendCalendar.java:40)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at com.sun.mail.iap.ResponseInputStream.readResponse(ResponseInputStream.java:97)
at com.sun.mail.iap.Response.<init>(Response.java:96)
at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:61)
at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:135)
at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:261)
at com.sun.mail.iap.Protocol.<init>(Protocol.java:114)
at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:104)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:538)
... 6 more
DEBUG: setDebug: JavaMail version 1.4.1
DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
DEBUG: mail.imap.fetchsize: 16384
DEBUG: enable SASL
DEBUG: mail.imap.sasl.authorizationid: user1
If i change the sessionFactory.class or if I remove this property I donot get any Exception It gets Executed well, but IT goes directly to the Adminstrators Mail account but not to the AuthorizationId I gave it. Can any one give me sugssion upon this issue.I don't understand whether the problem was with the Exchange Server I was trying to connect or with my local Environmenthi,
Iam very thankful for your reply here's the requested debug steps
DEBUG: setDebug: JavaMail version 1.4.1
DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
DEBUG: mail.imap.fetchsize: 16384
DEBUG: enable SASL
DEBUG: mail.imap.sasl.authorizationid: user1
DEBUG: protocolConnect returning false, host=india.lendingspace.com, user=PMaganti, password=<null>
* OK Microsoft Exchange 2000 IMAP4rev1 server version 6.0.6249.0 (lsinmail.india.lendingspace.com) ready.
A0 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 IDLE LOGIN-REFERRALS MAILBOX-REFERRALS NAMESPACE LITERAL+ UIDPLUS CHILDREN AUTH=NTLM
A0 OK CAPABILITY completed.
IMAP DEBUG: AUTH: NTLM
DEBUG: protocolConnect login, host=****, user=AdminUserName, password=<non-null>
IMAP SASL DEBUG: Mechanisms: NTLM
IMAP SASL DEBUG: No SASL support
A1 LOGIN AminUserName AdminPassword
A1 OK LOGIN completed.
A2 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 IDLE LOGIN-REFERRALS MAILBOX-REFERRALS NAMESPACE LITERAL+ UIDPLUS CHILDREN AUTH=NTLM
A2 OK CAPABILITY completed.
IMAP DEBUG: AUTH: NTLM
DEBUG: connection available -- size: 1
A3 SELECT INBOX
* 1 EXISTS
* 1 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
* OK [UNSEEN 1] Is the first unseen message
* OK [UIDVALIDITY 261914] UIDVALIDITY value
A3 OK [READ-WRITE] SELECT completed.
No of Messages msgs 1
A4 FETCH 1 (ENVELOPE INTERNALDATE RFC822.SIZE)
* 1 FETCH (ENVELOPE ("5 Mar 2009 13:25:19 +0530" "Outlook Calendar Events Using Java" ((NIL NIL "XXXXX" "XXXXX")) ((NIL NIL "XXXXX" "XXXXX")) ((NIL NIL "XXXXX" "XXXXX")) ((NIL NIL "XXXX" "XXXX")) NIL NIL NIL "<XXXXX>") INTERNALDATE " 5-Mar-2009 13:25:19 +0530" RFC822.SIZE 1348)
A4 OK FETCH completed.
FROM: XXXX
SUBJECT: Outlook Calendar Events Using Java
DATE: Thu Mar 05 13:25:19 IST 2009
A5 FETCH 1 (BODYSTRUCTURE)
* 1 FETCH (BODYSTRUCTURE (("TEXT" "CALENDAR" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 598 10 NIL NIL NIL) "mixed" ("boundary" "----=_Part_0_18680399.1236239719654") NIL NIL))
A5 OK FETCH completed.
[ Multipart Message ]
CONTENT:TEXT/CALENDAR; charset=US-ASCII
A6 STORE 1 +FLAGS (\Answered)
* 1 FETCH (FLAGS (\Answered \Recent))
A6 OK STORE completed.
A7 COPY 1 CALENDAR
A7 OK [COPYUID 262745 258 23] COPY completed, 1 messages copied.
A8 EXAMINE INBOX
* 1 EXISTS
* 0 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS ()] Permanent flags
* OK [UNSEEN 1] Is the first unseen message
* OK [UIDVALIDITY 261914] UIDVALIDITY value
A8 OK [READ-ONLY] EXAMINE completed.
A9 CLOSE
A9 OK CLOSE completed.
DEBUG: added an Authenticated connection -- size: 1
A10 LOGOUT
* BYE Microsoft Exchange 2000 IMAP4rev1 server version 6.0.6249.0 signing off.
A10 OK LOGOUT completed.
DEBUG: IMAPStore connection dead
DEBUG: IMAPStore cleanup, force false
DEBUG: IMAPStore cleanup done
Actually what iam doing is read a mail which was more recent in inbox and If it is an Calendar event Iam copying that mail to Calendar Folder. So that Microsoft OUTLOOK automatically recongnizes them and secudles them in it's Calendars
This is actually done for adminstrator's Account but not for the user1
As you have suggested I removed the socketFactory class stuff and did this.
and this is my modified Code
props.put("mail.imap.host",imapHost);
props.put("mail.imap.sasl.enable", "true");
props.put("mail.imap.sasl.authorizationid", "user1");
Authenticator auth=new myauthentication(imapUserName,imapPassword);
Session session = Session.getInstance(props,auth);
session.setDebug(true);
store = session.getStore("imap");
store.connect();
And that goes like that. -
Any one have idea how to read microsoft exchange server inbox mail
I am trying to build a program which can read the mail from exchange server and i found microsoft exchange server is used MAPI protocol for mail server. I did not found anything which can guide me how to read exchange server mail and what ever i found is, i need to use connector to connect with microsoft exchange server.
The simplest approach is to configure the Exchange server to allow IMAP access. If you can't do that, you'll need to use one of the third party products that use MAPI to access Exchange.
-
Connecting to MS Exchange server
We are going to implement outlook functionality in our project. So that, we are trying to connect Microsoft Exchange server.
Sofar, I found the some information reg this thing from google.
Before connecting MS Exchange server, first I have to connect LDAP server using JNDI API.
Is any Java API provided for connecting to MS Exchange server from LDAP. If is there, How can I connect to MS Exchange server using J2EE application from LDAP?No, not from JNDI.
You can manage Exchange Server via CDOEXM.
Details on CDOEXM can be found at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_esdk_reference_cdoex.asp
Not being a Java developer, I don't know how you invoke COM objects from Java. -
Hi,
I have set up Exchange Server 2013 on Windows Server 2008 R2. Everything is working fine except I am unable to configure Exchange account in Outlook 2010 or any other version. It says
"The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action."
Error screenshot is attached. Even, I am able to configure exchange active sync on my adroid and ipad which is working perfect. Please let me know if any body have any idea about it. Searched many blog and forum but still now solution till now.
Thanks in advance
Regards,
ManojHi Manoj,
Can you ping your Exchange server? It would hlep us isolate the fault from network releated issue.
Is there a trusted certificate installed on Exchange 2013 server?
If you run the test of RPC over HTTP in
https://www.testexchangeconnectivity.com/, is there any error returned?
For more information, please refer to :
http://technet.microsoft.com/en-us/library/bb123741(v=exchg.150).aspx
http://social.technet.microsoft.com/Forums/en-US/exchangesvrgeneral/thread/1b4dc21c-c745-4699-8eee-423105608dcd/
Thanks.
Fiona Liao
TechNet Community Support -
Dear All,
I cannot connect to my Exchange account in Outlook 2013 using "Microsoft Exchange Server or Compatible Service".
First I would like to present my network environment, I have 4 physical servers;
The first one is holding the Domain Controller 1, IP@: 192.168.1.10
The second server is holding the additional Domain Controller which it is DC2, IP@: 192.168.1.11
The third server is holding the Exchange 2013 Mailbox, IP@: 192.168.1.15
And the last server is holding the Exchange 2013 CAS-HT, IP@: 192.168.1.16
I am doing the steps below:
1-Creating a new profile in outlook and start configuring the exchange account by entering the IP address of the Exchange-CAS Server, 192.168.1.16
2-entering the account name: [email protected]
3-Go to "More Settings" > "Connection" > "Connect to Microsoft Exchange using HTTP" > and entering the "Exchange Proxy Settings"
4-type the exchange CAS Server URL, https://192.168.1.16
5-Check the "Connect using SSL Only"
6-Authentication Settings: "NTLM Authentication", and pressing Apply
7-When I press the "Check Name" button, a message occurred> "The action cannot be completed. The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action".
8-I go back to the "Exchange Proxy Settings" and I Uncheck the "Connect using SSL Only" and pressing Apply
9-i press the "Check Name" Button, a small window occurred to enter a Username and Password, so I enter the Administrator username and the administrator password and pressing "OK", but nothing is changed, I tried to enter my
username and password in the small window and I still got the same result.
I cannot verify the account name and I cannot complete the process.
I appreciate you kind assistance.Hi,
To narrow down the cause, I’d like to recommend the following troubleshooting:
1. Try to login the test account through OWA.
2. Check the Autodiscover settings: get-clientaccessserver |fl autodiscoverserviceinternaluri
3. Check the result of directly accessing the following URL:
https://autodiscover.domain.com/autodiscover/autodiscover.xml
Thanks,
Angela
Angela Shi
TechNet Community Support -
My iPhone V will not connect to a Microsoft Exchange server. It says that the User Name or Password are incorrect even though they're not and I can log on directly to Exchange with the same parameters using the web browser.
I bought the phone when it came out last October. The connection did not work at first, then started without warning in December. It worked perfectly for 2 months then stopped again when IOS 6.1.2 was Installed.
Help please!I have forwarded these questions about the version of Exchange server that is being used and whether Microsoft host the mai themselves to the IT Dept but I will not get a reply from them until tomorrow.
In the meantime I have also tried:
Deleting and re-creating the account AGAIN!
And re-setting the phone (recommended as a solution to a similar problem with an iPad in another forum.
But please remember that:
The phone would not connect for 2 months after I bought it
Then started working unexpectedly in December
Then stopped working again when IOS 6.1.2. was installed
Also why am I the only person affected by this when colleagues with iPhone 3s and 4s who use the same mail system are not (I am still trying to find one with an iPhone V to see if their's works).
Like I said I think that there must be a fault, either with my own phone or with iPhone Vs in general.
Maybe you are looking for
-
Delivery cost condition type in PO coming as display mode
Hi Experts, In my Purchase order having delivery cost condition types, for ex freight. For this PO i have done Goods receipt. PO all the delivery costs are showing in display mode. i have reversed the Good receipt.Again also all the delivery costs a
-
Set cover flow view to all playlists
Hello, Does anyone know how I can choose a view, say cover flow in my playlists and apply this to all playlists with out having to go through each playlist?. I would also like to choose certain columns (e.g track number etc) and apply this to all of
-
Troubleshoot and Setup FiOS Connections with VZ In Home Agent
"VZ In Home Agent" is a new desktop tool (Major Enhancement to the earlier FiOS Connection Wizard) that helps with your FiOS services. This tool is simple, easy-to-use and has information about various features of your FiOS Services including 'How to
-
Make changes in "wwnls_strings$ table" but dont see the resault
hi all, im using portal 10g on a suse 8. i've used "wwnls_api.set_string" function and have changed some strings (for example ive changed welcome_title from "welcome" to "welcome to my site") in the wwnls_string table (this table stores th multilingu
-
Decrypt errors occurred for client
I am getting error messages for clients: 11 Mon Jun 14 09:11:56 2010 Decrypt errors occurred for client 00:13:ce:54:57:3c using WPA key on 802.11b/g interface of AP 00:16:9c:91:97:c0 12 Mon Jun 14 09:11:56 2010 Decrypt errors occurred for client 00:1