Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfset local.objIMAP = structNew()>
- <cfset local.objIMAP.server = "imap.gmail.com">
- <cfset local.objIMAP.username = "username">
- <cfset local.objIMAP.password = "password">
- <!--- Open the connection --->
- <cfimap
- action="open"
- secure="yes"
- connection="myConnection"
- attributeCollection="#local.objIMAP#">
- <cfimap
- action="getHeaderOnly"
- connection="myConnection"
- name="getHeaders">
- <!--- Get the messagenumber of latest mail --->
- <cfquery dbtype="query" name="getID">
- SELECT MAX(getHeaders.messagenumber) AS latestMessage
- FROM getHeaders
- </cfquery>
- <cfimap
- action="getall"
- connection="myConnection"
- name="getAttachment"
- attachmentpath="E:/"
- MessageNumber="#getID.latestMessage#">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement