Posts

Showing posts from March, 2013

Coldfusion code to get multiple mail attachments using cfimap

Below given code will loop through multiple attachments of the mail and will copy the attachments to particular folder. <cfimap action="open" connection="Conn" server="serverURL" username="useremail" password="password" secure="yes" port="portvalue"> <cfimap action="getall" connection="Conn" name="Query_getAttachments" folder="Inbox" attachmentpath="#GetTempDirectory()#" > <cfquery dbtype="query" name="getMailAttachments">       select *       from Query_getAttachments       where seen=<cfqueryparam value="no" cfsqltype="cf_sql_varchar">       and ATTACHMENTS is not null </cfquery> <cfdump var="#getMailAttachments#"> <cfloop query="getMailAttachments">       <cfif getMailAttachments.ATTACHMENTS NEQ ''>         <cfloop list="#ge