ps122

导航

 
select name from msdb.dbo.sysmail_profile

--邮件发送日志
SELECT * FROM msdb.dbo.sysmail_event_log

delete  FROM msdb.dbo.sysmail_event_log

--邮件内容
SELECT * FROM msdb.dbo.sysmail_allitems

delete FROM msdb.dbo.sysmail_allitems

EXEC msdb.dbo.sp_send_dbmail 
@profile_name = 'test',
@recipients = 'XXX@XXX.com', 
@subject = 'mail test',
@body = 'Hi!' 

 

posted on 2016-06-27 11:22  ps122  阅读(132)  评论(0编辑  收藏  举报