Email Attachments and FolderItem

I am using the Pop3 control to get emails from a mail server and all is working great but when I come to try and save an attachment it doesnt save.

dim file as folderitem file = new FolderItem( saved = attachment.SaveToFile(file)

I have checked the and it contains the name of the attachment but when I go the SaveToFile the saved boolean always returns false. I really dont understand how to use the FolderItem when you are trying to refer to something that doesnt exist and you want to create it. I have looked at the docs for the SaveToFile and they look totally wrong.

[quote]EmailAttachment.SaveToFile ( File as FolderItem ) As Boolean

Saves the attachment to File. Returns a Boolean, True if successful.

dim f as new folderitem
if file.savetofile(f) then
msgbox “The attachment was saved!”
end if[/quote]

Try setting file to SpecialFolder.Desktop.child(

I have the same problem. I cannot save the attachment. I tried Temporary Folder, Desktopfolder and so on.
attachment.savetofile(f) always returns false for me and file is not saved.
Any other suggestions how to debug this?

Before writing the file, check the IsWritable property of the FolderItem. It may still be that the user doesn’t have permission to write to those locations.