Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

viewing email attachments

Status
Not open for further replies.

smbayo

Programmer
Joined
Jun 26, 2001
Messages
6
Location
US
I am developing an email apps in CF. However, viewing email attachments from msg is proving such a pain. here's is my code;

Code:
<FONT FACE=&quot;Helvetica&quot; SIZE=&quot;-1&quot;><B>Attached:</B>	
<CFLOOP FROM=&quot;1&quot; TO=&quot;#ListLen(Message.Attachments,'	')#&quot; INDEX=&quot;CurrItem&quot;>
	<CFSET FileName = &quot;#AttachDir##URLEncodedFormat(GetFileFromPath(ListGetAt(Message.AttachmentFiles, CurrItem, '	')))#&quot;>
	<CFOUTPUT>
		<CFSET FileName = Replace(FileName, &quot;%2E&quot;, &quot;.&quot;, &quot;ALL&quot;)>
		<cfset FileName = Replace(FileName,&quot;%20&quot;,&quot; &quot;,&quot;ALL&quot;)>
		<cfset FileName = Replace(FileName,&quot;%5F&quot;,&quot;_&quot;,&quot;ALL&quot;)>

		
<br><A HREF=&quot;getfile.cfm/#GetFileFromPath(Filename)#?Filename=#URLEncodedFormat(Filename)#&quot;>#ListGetAt(Message.Attachments, CurrItem, &quot;	&quot;)#</A>
<br>

	</CFOUTPUT> 
</CFLOOP>

..... and this is the getfile.cfm page code that &quot;should&quot; get the file:

Code:
<cfcontent type=&quot;application/unknown&quot; FILE=&quot;#URL.Filename#&quot; deletefile=&quot;No&quot;>

The frustrating thing is that when i work locally on my localhost it works fine .... but when I load up the files on the main server it doesn't work.

please help ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top