xp_smtp_sendmail参数

Code Block

ALTER TRIGGER [smallin].[trig_test]

ON [smallin].[DATALIST]

AFTER INSERT

AS

declare @rc int,

@post bit,

@pre bit

SELECT @post = [POST], @pre = [PRE] FROM inserted

IF @post = 1

exec @rc = master.dbo.xp_smtp_sendmail

@FROM = N'ln.li@mydomain.com',

@FROM_NAME = N'Alert Mailer',

@TO = N's.mallin@mydomain.com',

@replyto = N'ln.li@mydomain.com',

@CC = N'',

@BCC = N'',

@priority = N'NORMAL',

@subject = N'This is post data',

@message = N'Goodbye MAPI and Outlook',

@messagefile = N'',

@type = N'text/plain',

@attachment = N'',

@attachments = N'',

@codepage = 0,

@server = N'exchange.mydomain.com'

 

ELSE IF @pre = 1

exec @rc = master.dbo.xp_smtp_sendmail

@FROM = N'ln.li@mydomain.com',

@FROM_NAME = N'Alert Mailer',

@TO = N's.mallin@mydomain.com',

@replyto = N'ln.li@mydomain.com',

@CC = N'',

@BCC = N'',

@priority = N'NORMAL',

@subject = N'This is pre data',

@message = N'Goodbye MAPI and Outlook',

@messagefile = N'',

@type = N'text/plain',

@attachment = N'',

@attachments = N'',

@codepage = 0,

@server = N'exchange.mydomain.com'

posted @ 2013-12-09 12:04  so...  阅读(415)  评论(0编辑  收藏  举报