Thursday, February 26, 2009

Get your GMAIL using Coldfusion's CFPOP

Here is a code sample on how to pull your email off of Gmail.

<cfset javaSystem = createObject("java", "java.lang.System") />
<cfset jProps = javaSystem.getProperties() />
<cfset jProps.setProperty("mail.pop3.socketFactory.class", "") />
<cfset jProps.setproperty("mail.pop3.port",995) />
<cfset jProps.setProperty("mail.pop3.socketFactory.port", 995) />

<cfpop action="GETALL" name="getMail" server="" username="[yourUserName]" password="[yourPassword]" port="995" maxrows="20" timeout="90">

<cfdump var="#getMail#">

Be sure to enable POP on your gmail account

Fusecast Web Application Development and Web Hosting Services

1 comment:

viji said...

My cousin recommended this blog and she was totally right keep up the fantastic work!

Flash Development