Hello
I am trying to send email with attachment (the attachment file is generated in the same package couple of tasks before the sending mail part) .I am trying to send email using Execute Sql task and sp_send_mail procedure.
total file path and email subject are being passed from ssis variables
But i am getting an error saying that \\shared\ETL\DEV\SendEmailFileName_FIleID_32 is invalid
But i see the file in the Folder directory
use [msdb]Declare @filename nvarchar(1000)= ?
Declare @emailSubject varchar(1000)= ?
EXEC dbo.sp_send_dbmail
@recipients='correctemailadress',
@subject=@emailSubject,
@body='This is a System Generated Email',
@profile_name = 'EDS SSIS DEV Mailer',
@file_attachments=@filename
;
Can you please help ?