<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Thinking Lemur &#187; Java</title>
	<atom:link href="http://thinkinglemur.com/index.php/category/thinking/programming/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkinglemur.com</link>
	<description>from the mind of Donnie Bachan</description>
	<lastBuildDate>Fri, 06 Jan 2012 10:42:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>CFPOP and SSL</title>
		<link>http://thinkinglemur.com/index.php/2009/04/cfpop-and-ssl/</link>
		<comments>http://thinkinglemur.com/index.php/2009/04/cfpop-and-ssl/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 11:05:40 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[CFPOP]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=220</guid>
		<description><![CDATA[One of the reasons I love Adobe's ColdFusion so much is the fact that it is built on a Java engine and you are able to use a lot of the powerful features of Java from CF. I however don't get to use this feature often enough, mainly because most of the things I work [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F04%2Fcfpop-and-ssl%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F04%2Fcfpop-and-ssl%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>One of the reasons I love Adobe's ColdFusion so much is the fact that it is built on a Java engine and you are able to use a lot of the powerful features of Java from CF. I however don't get to use this feature often enough, mainly because most of the things I work on daily doesn't really need anything other than what is provided by the CF natively. And, well, as with anything without practice your skills get dull, so when I had to access a mailbox that is hosted by Gmail using CFPOP I was forced to turn to Google to find a solution.</p>
<p>CFPOP does not support SSL/TLS connections as of version 8, which is quite a big limitation since so many services now support SSL for POP connections. There are quite a few options for work arounds for this but the simplest and quite elegant solution is the one provided by <a href="http://www.anujgakhar.com/2008/05/18/cfpop-and-gmail/">Anuj Gakhar</a>. This solution uses the underlying Java pop service which does support SSL.</p>
<blockquote><p> </p>
<p>&lt;cfset javaSystem = createObject("java", "java.lang.System") /&gt;</p>
<p>&lt;cfset jProps = javaSystem.getProperties() /&gt;</p>
<p> </p>
<p>&lt;cfset jProps.setProperty("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory") /&gt;</p>
<p><span> </span>&lt;cfset jProps.setproperty("mail.pop3.port", variables.popPort) /&gt;</p>
<p><span> </span>&lt;cfset jProps.setProperty("mail.pop3.socketFactory.port", variables.popPort) /&gt;</p>
<p> </p>
<p> </p></blockquote>
<p>Set variables.popPort to the port on which your POP server is accessed. You then call the CFPOP tag as you would normally:</p>
<blockquote><p>&lt;cfpop action="getHeaderOnly"</p>
<p>            server="#variables.popServer#"</p>
<p>            port="#variables.popPort#"</p>
<p>            username="#variables.popUsername#"</p>
<p>            password="#variables.popPassword#"</p>
<p>            maxrows="5"</p>
<p>            timeout="60"</p>
<p>            name="variables.popRecords" /&gt;</p></blockquote>
<p>The underlying Java platform can allow you to perform many tasks that may not be available in ColdFusion, so why not do some experiments?</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/04/cfpop-and-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

