April 14, 2010 at 2:05 pm
Im unable to send multiple attachment using sp_send_dbmail.
SET NOCOUNT ON
EXEC msdb.dbo.sp_send_dbmail
@recipients='xxxx.xxxx@xxxx.org,
@subject = @sub,
@body = @tableHTML,
@body_format = 'HTML',
@profile_name = 'Refresh',
@file_attachments =@2PATH;@1PATH;
I only get the attachment of @2PATH file in my email.
I have tried as suggested to include 'SET NOCOUNT ON'.No luck
If I were to try one variable at a time.It works fine
How do I do this ?
April 14, 2010 at 2:14 pm
This thread might help you out :
April 14, 2010 at 2:23 pm
I have tried the following, but no luck
[@file_attachments =@2PATH;@1PATH];
@[file_attachments] =@2PATH;@1PATH;
[@file_attachments] =[@2PATH;@1PATH];
Anything Im missing
April 14, 2010 at 5:10 pm
Have you tried with a single variable? I think I remember reading about that requirement on the post I sent you.
SET @Path = 'c:\whatever.txt;d:\report.html;\\Shared\this.zip'
April 15, 2010 at 3:17 pm
Hope it's not a stupid question but have you tried with 2 different files or did you change your code for the post?
Other than that I just don't know what else is the problem.
I may suggest zipping them up and sending the zipped file but that seems like a bit of a wasted step for nothing.
April 15, 2010 at 3:22 pm
Thank You Ninja, I had tried as per your suggestion.I have opted to do it in another way.Adding it as a hyperlink to an ssrs report that has the data
Thank You for your time
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply