来自cmd的dbmail电子邮件

时间:2012-12-26 17:18:11

标签: sql-server sqlcmd dbmail

是否可以使用dbd从dbd发送电子邮件附件?我正在使用批处理文件使用dbmail发送电子邮件附件但收到错误。这是我的代码:

sqlcmd -q "EXEC msdb.dbo.sp_send_dbmail @profile_name = 'ProfileName',
  @recipients='example@test.com',
  @subject='Test Attachment ',
  @body='Using dbmail to send attachment',
  @file_attachments='C:\document\example.txt'"

0 个答案:

没有答案