BTW I have sent this email out twice before. Yesterday and this morning so if you are getting it more than once, I apologize.
I am running the code below (a modified version of the CF 8 docs example). It returns a couple of messages and then it seems to be choking on the first attachment. ----------- Error ------------------------- Access denied. The Exchange resource requires authorization or authorization was refused. The error occurred in C:\xampplite\htdocs\SearchRFPs\getemail.cfm: line 55 53 : name="attachData" 54 : attachmentPath="#attachmentPath#" 55 : generateUniqueFilenames="yes" > 56 : 57 : <cfloop query="attachData"> ------------ //End error ------------------- I Googled different combinations of: authorization was refused cfexchangemail and The Exchange resource requires authorization or authorization was refused cfexchangemail and got zero results. And yes, I need the attachments as many of them are RFP's (Request For Proposals) in Word or PDF format. Any suggestions? TIA Jerry ------------ Code ----------------------- <cfexchangeConnection action="#exchangeaction#" username="#exchangeuser#" password="#exchangepassword#" server="#exchangeServer#" connection="testconn" protocol = "https" > <cfexchangemail action="get" folder="#tmpMailFolder#" name="weeksMail" connection="testconn"> <!--- <cfexchangefilter name="FromID" value="docuser2"> ---> <cfexchangefilter name="TimeSent" from="#lastWeek#" to="#rightNow#"> </cfexchangemail> <cfoutput> <cfloop query="weeksMail"> <cfif weeksmail.HasAttachment> <cfexchangemail action="getAttachments" connection="testconn" folder="#tmpMailFolder#" uid="#weeksmail.uid#" name="attachData" attachmentPath="#attachmentPath#" generateUniqueFilenames="yes" > <cfloop query="attachData"> #attachmentFilename# <br /> #size# <br /> <hr /> </cfloop> </cfif> Message ID #weeksmail.uid# <!--- C:\temp\cf_files\attachments\Msg_#i#<br /> ---> <br /> Message information:<br /> Subject: #weeksmail.Subject#<br /> Sent: #dateFormat(weeksmail.TimeSent)#<br /> From: #weeksmail.FromID#<br /> <br /> <cfset i++> </cfloop> </cfoutput> <cfexchangeConnection action="close" connection="testconn"> ------------ // End Code ----------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297351 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4