Sql-server – how to add attachment(text file) to database mail

sql serversql-server-2005t-sql

I have scenario

Daily i run a sql job to apply a new updates to one table – this job will create one text file daily – text file contains all new updates

I can send a mail to client that job is successfully completed – now i need to send him a text file as a attachment

Is there any way to send attachment through GUI (SQL Server Job setting)

I cann't run the script

EXEC sp_send_dbmail

I googled for this scenario but no information from GUI END – i could find from only with scripts

Best Answer

I was looking of for the same issue myself, and gave up. It seems that attachments can only be sent using TSQL, such as this

EXEC sp_send_dbmail 
  @profile_name='MailProfile',
  @recipients='me@gmail.com',
  @subject='TestEmail',
  @body='I'm sending you this document...',
  @file_attachments='D:\TEST\file.doc'