?
Solved

Acces Gmail with coldfusion cfpop

Posted on 2008-10-14
4
Medium Priority
?
772 Views
Last Modified: 2013-12-20
Can some one help me out with accessing gmail with cfpop in coldfusion, the main problem is cfpop dont support ssl but i know it can be done,

this code should work
<html>
<head>
<title>POP Mail Message Attachment Example</title>
</head>
 
<body>
<h2>This example retrieves message header,
body, and all attachments:</h2>
 
<cfset javaSystem = createObject("java", "java.lang.System") />
<cfset jProps = javaSystem.getProperties() />
<cfset jProps.setProperty("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory") />
<cfset jProps.setproperty("mail.pop3.port",995) />
<cfset jProps.setProperty("mail.pop3.socketFactory.port", 995) />
 
<cfpop server="pop.gmail.com"
  username="mygmailzzzz@gmail.com"
  password="**********"
  action="GetAll"
  attachmentpath="c:\temp\attachments"
  name="Sample" >
 
<cfoutput query="Sample">
  MessageNumber: #HTMLEditFormat(Sample.MessageNumber)# <br>
  To: #HTMLEditFormat(Sample.to)# <br>
  From: #HTMLEditFormat(Sample.from)# <br>
  Subject: #HTMLEditFormat(Sample.subject)# <br>
  Date: #HTMLEditFormat(Sample.date)# <br>
  Cc: #HTMLEditFormat(Sample.cc)# <br>
  ReplyTo: #HTMLEditFormat(Sample.ReplyTo)# <br>
  Attachments: #HTMLEditFormat(Sample.Attachments)# <br>
  Attachment Files: #HTMLEditFormat(Sample.AttachmentFiles)# <br>
  <br>
  Body:<br>
  #Sample.body# <br>
 
  <hr>
</cfoutput>
 
</body>
</html>

Open in new window

0
Comment
Question by:jdunneuk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 19

Accepted Solution

by:
erikTsomik earned 500 total points
ID: 22711646
take a look at this
http://www.bennadel.com/index.cfm?dax=blog:1056.view
So basically what you need to do is go into the JVM properties and set it to use SSL over the specified port.

also for ssl we have custom tag
http://cf_sslpop.riaforge.org/
0
 
LVL 19

Expert Comment

by:erikTsomik
ID: 22711952
thank you
0
 
LVL 3

Author Comment

by:jdunneuk
ID: 22711966
how do you set the ssl property? can you show me an example please :)
0
 
LVL 19

Expert Comment

by:erikTsomik
ID: 22711989
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question