G
Gary
I am trying to connect to our own mail server (Ubuntu, dovecot,
postfix) and, started by connecting to GMail as a test. I finally got
that to work and modified the code to work with our own server. Even
though Thunderbird connects regularly using port 993 with unencrypted
authentication, when i try to connect with JavaMail there is no
response from the server and the code just waits for return from the
store.connect method. As a test, I turned off firewalls at both client
and server ends which did not help. Here is the core of the code:
**********************
Properties props = new Properties();
session = Session.getDefaultInstance(props, null);
Store store = session.getStore("imap");
store.connect(serverName, 993, userName, password);
************************
If I try connecting with imaps, I get a "PKIX path building failed:"
exception since I have not imported the required certificate. But
using imaps should not be necessary because Thunderbird does
unencrypted authentication and does not have a certificate either, so
it seems like I should be able to get JavaMail to work without a
certificate the way Thunderbird works without a certificate. I am
really only interested in using JavaMail for authentication and not
actually reading email so if I can just make the original connection
and authenticate username and password, I don't really care about
anything beyond that - at least, not now.
Any advice or suggestions on how to proceed or what to look at would
be appreciated.
Thank you,
Gary Whitten
postfix) and, started by connecting to GMail as a test. I finally got
that to work and modified the code to work with our own server. Even
though Thunderbird connects regularly using port 993 with unencrypted
authentication, when i try to connect with JavaMail there is no
response from the server and the code just waits for return from the
store.connect method. As a test, I turned off firewalls at both client
and server ends which did not help. Here is the core of the code:
**********************
Properties props = new Properties();
session = Session.getDefaultInstance(props, null);
Store store = session.getStore("imap");
store.connect(serverName, 993, userName, password);
************************
If I try connecting with imaps, I get a "PKIX path building failed:"
exception since I have not imported the required certificate. But
using imaps should not be necessary because Thunderbird does
unencrypted authentication and does not have a certificate either, so
it seems like I should be able to get JavaMail to work without a
certificate the way Thunderbird works without a certificate. I am
really only interested in using JavaMail for authentication and not
actually reading email so if I can just make the original connection
and authenticate username and password, I don't really care about
anything beyond that - at least, not now.
Any advice or suggestions on how to proceed or what to look at would
be appreciated.
Thank you,
Gary Whitten