您的位置:首页 > 数据库

[MSSQL]SQL Server 2008 通过配置数据库邮件实现发送邮件功能

2012-12-22 16:46 736 查看
http://www.soaspx.com/dotnet/sql/mssql/sql2008/sqlserver2008_20100109_2287.html
http://kanshan.blog.51cto.com/111574/687144


Exec msdb.dbo.sp_send_dbmail @profile_name='David的配置邮件',

@recipients='it-2@zettlercn.com',

@subject='数据库邮件测试',

@body='这是从 ERP2010 上的数据库邮件发出的测试电子邮件!'





Exec msdb.dbo.sp_send_dbmail @profile_name='David的配置邮件',

@recipients='it-2@zettlercn.com',

@subject = '查询结果',

@body = '查询结果在附件中',

@query = 'select TOP 100 MB001,MB002,MB003 from ZE.dbo.INVMB',

@attach_query_result_as_file = 1,

@query_attachment_filename = 'a.txt'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: