{"id":52,"date":"2011-07-06T10:51:09","date_gmt":"2011-07-06T14:51:09","guid":{"rendered":"http:\/\/www.tuannguyen.net\/blog\/?p=52"},"modified":"2011-07-06T11:11:20","modified_gmt":"2011-07-06T15:11:20","slug":"cfpop","status":"publish","type":"post","link":"https:\/\/www.tuannguyen.net\/blog\/2011\/07\/06\/cfpop\/","title":{"rendered":"CFpop"},"content":{"rendered":"<p style=\"text-align: left\">CFpop introduced to retrieve or delete email messages from a POP mail server.\u00a0 This tag is useful to pull emails from a pop server for displaying on a webpage or inserting into a database.\u00a0 One disadvantage is that CFpop doesn&#8217;t have SSL connection.\u00a0 So first, we must generate SSL connection, then use CFpop to connect to the POP mail server<\/p>\n<pre lang=\"cfm\">\r\n<cfset javaSystem = createObject(\"java\", \"java.lang.System\") \/>\r\n<cfset jProps = javaSystem.getProperties() \/>\r\n<cfset jProps.setProperty(\"mail.pop3.socketFactory.class\", \"javax.net.ssl.SSLSocketFactory\") \/>\r\n<cfset jProps.setproperty(\"mail.pop3.port\",995) \/>\r\n<cfset jProps.setProperty(\"mail.pop3.socketFactory.port\", 995) \/>\r\n\r\n<cfpop server=\"pop.gmail.com\" username=\"user@gmail.com\" password=\"pw\" action=\"getall\" name=\"emails\" generateuniquefilenames=\"yes\" attachmentpath=\"\/home\/web\/public_html\/email_attachments\/\" \/>\r\n<\/pre>\n<p style=\"text-align: left\"><strong>Variables returned:<\/strong><\/p>\n<ul>\n<li>queryname.recordCount<\/li>\n<li>queryname.currentRow<\/li>\n<li>queryname.columnList<\/li>\n<li>queryname.date<\/li>\n<li>queryname.from<\/li>\n<li>queryname.messagenumber<\/li>\n<li>queryname.messageid<\/li>\n<li>queryname.replyto<\/li>\n<li>queryname.subject<\/li>\n<li>queryname.cc<\/li>\n<li>queryname.to<\/li>\n<li>queryname.body<\/li>\n<li>queryname.textBody<\/li>\n<li>queryname.HTMLBody<\/li>\n<li>queryname.header<\/li>\n<li>queryname.attachments<\/li>\n<li>queryname.attachmentfiles<\/li>\n<li>queryname.UID<\/li>\n<li>queryname.cids<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CFpop introduced to retrieve or delete email messages from a POP mail server.\u00a0 This tag is useful to pull emails from a pop server for displaying on a webpage or inserting into a database.\u00a0 One disadvantage is that CFpop doesn&#8217;t have SSL connection.\u00a0 So first, we must generate SSL connection, then use CFpop to connect [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[21,30],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-computer","tag-coldfusion","tag-computer-2"],"_links":{"self":[{"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":16,"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions\/69"}],"wp:attachment":[{"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tuannguyen.net\/blog\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}