thecfguy

A Unique Developer

CFPOP with SSL support

Coldfusion CFPOP doesn't support POP3 SSL. I dont know when Adobe will implement this ability, meanwhile I have created custom tag which support SSL connection which I like to share with you. Java class java.lang.System can be used to enable the SSL support with coldfusion CFPOP tag.

"java", "java.lang.System") />

"mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory") />

We just need to put above three statements before using CFPOP tag and it will enable SSL for pop3 access, but this not end I my case I wanted to access some pop accounts with SSL and some of them without SSL. In this case we require to disable SSL for CFPOP tag by passing below statement

"java", "java.lang.System") />

"mail.pop3.socketFactory.class", "javax.net.SocketFactory") />

Rather than writing three statements everytime I preffered to create custom tag which allow us SSL enable pop3 access by adding extra attributes SSL.










   

   




   

This one work fine for me so far. Ofcourse there is little pain putting underscore between cf and pop :) but still it is better than adding three line of code everytime.