[thelist] JMail.POP3 - Saving attachments as a different filename?
Christian Anderson
chris at jobdragon.com
Thu Jul 10 01:08:53 CDT 2003
Hi,
Does anyone here know how to save attachments using JMail.POP3 (ASP) as a
different filename than the original?
Here is the code that is saving the file to disk. I've tried to add a few
random numbers and stuff before the at.Name like this:
at.SaveToFile( "c:\hshome\chris\attachments\" & randomnumbersstring &
at.Name )
but that didn't work... the error it gives is: error '8000ffff',
Catastrophic failure
Help!!
---------------code--------------------------------
Function getAttachments()
Set Attachments = msg.Attachments
separator = ", "
For i = 0 To Attachments.Count - 1
If i = Attachments.Count - 1 Then
separator = ""
End If
Set at = Attachments(i)
at.SaveToFile( "c:\hshome\chris\attachments\" & at.Name )
getAttachments = getAttachments & "<a href=""/attachments/" &_
at.Name &""">" & at.Name & "(" & at.Size & " bytes)" &_
"</a>" & separator
Next
End Function
Function dbAttachments()
Set Attachments = msg.Attachments
separator = ", "
For i = 0 To Attachments.Count - 1
If i = Attachments.Count - 1 Then
separator = ""
End If
Set at = Attachments(i)
dbAttachments = dbAttachments & at.Name
Next
End Function
---------------code--------------------------------
More information about the thelist
mailing list