Hello All,
Anyone using JavaMail and coldfusion together to send/fetch emails via SSL?
I tried gmail, but got time out errors. Increased the time limit, but didn't
help.
non-ssl emails work fine.
Any suggestions? Thanks in advance
Hua
JavaMail version: 1.3.2
System: CFMX 7 enterprise on windows 2000
======== code ========================
<cfscript>
username = "[username]";
password = "[password]";
debug = true;
POP_HOST_NAME = "pop.gmail.com";
POP_PORT = "995"; //995 for gmail
SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
prop = createObject("Java", "java.util.Properties").init();
prop.setProperty("javax.mail.pop3.starttls.enable", "true");
prop.setProperty("javax.mail.pop3.socketFactory.class", SSL_FACTORY);
prop.setProperty("javax.mail.pop3.socketFactory.fallback", "false");
prop.setProperty("javax.mail.pop3.port", POP_PORT);
prop.setProperty("javax.mail.pop3.socketFactory.port", POP_PORT);
urlName = createObject("Java", "javax.mail.URLName");
urlName.init("pop3",POP_HOST_NAME,POP_PORT,JavaCast("null",
""),username,password);
mySession = createObject("java", "javax.mail.Session").getInstance(prop);
mySession.setDebug(debug);
store = mySession.getStore(urlName);
// connect to mailbox
store.connect();
inbox = store.getFolder("INBOX");
inbox.open(inbox.READ_ONLY);
messages = inbox.getMessages();
store.close();
</cfscript>
=========================
=================== fetching debug output ===========================
DEBUG: setDebug: JavaMail version 1.3.2
DEBUG: getProvider() returning
javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsy stems,
Inc]
DEBUG POP3: connecting to host "pop.gmail.com", port 995, isSSL false
S: EOF
08/30 09:43:11 Warning [jrpp-2] - Thread: jrpp-2, processing template:
D:\HTDOCS\webroot\test_gmailget.cfm, completed in 60 seconds, exceeding the 60
second warning limit
C: QUIT
S: EOF
=============================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216758
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54