using a variable for a @TO parameter in xp_stmp_sendmail
From: schmidtk (schmidtk_at_discussions.microsoft.com)
Date: 06/17/04
- Previous message: Billz89: "Re: Finding non-duplicate records?"
- Next in thread: Nigel Rivett: "RE: using a variable for a @TO parameter in xp_stmp_sendmail"
- Reply: Nigel Rivett: "RE: using a variable for a @TO parameter in xp_stmp_sendmail"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Jun 2004 10:40:01 -0700
I am using the following to send mail, but instead of
@TO = N'yyy@abc.ab.ca'
I want to specify a variable from my procedure:
@TO = N@emailaddress
where @emailaddress is populated during the procedure
declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM = N'xxx@abc.ab.ca',
@FROM_NAME = N'Tenrox Time*** Approval',
@TO = N'yyy@abc.ab.ca',
@subject = N'Please approve overtime for the following staff',
@messagefile= N'C:\testing.txt',
@type = N'text/plain',
@attachments= N'C:\HowToApprove.txt',
@server = N'sssssss.abc.ab.ca'
- Previous message: Billz89: "Re: Finding non-duplicate records?"
- Next in thread: Nigel Rivett: "RE: using a variable for a @TO parameter in xp_stmp_sendmail"
- Reply: Nigel Rivett: "RE: using a variable for a @TO parameter in xp_stmp_sendmail"
- Messages sorted by: [ date ] [ thread ]