Good Morning I am working with sql Xp_readmail in 2008, and have the following problem, some form of him to set the parameter @ attachments by default save the attachment in a temporary folder within the profile and i need to save to a selected folder and rename it. thank you very much and hugs to all
Try populating the @AttachedFiles parameter from @attachments parameter of xp_readmail and then use copy commad with xp_cmdshell to move/copy to different location....I don't think there is an option to change the location... declare @AttachedFiles varchar(1000) set @AttachedFiles = 'copy /Y ' + @AttachedFiles + ' C:AttachedFolder' print @AttachedFiles exec master..xp_cmdshell @AttachedFiles
Microsoft says that this feature (xp_ReadMail) will be removed in the future. It is always better to avoid using SQL Server for features like this. SQL Server is best useful to read data from database and not from mail servers.