by using stored procedures and dts with a job here is how it goes...
in the SP -
CREATE PROCEDURE [StoreProcedureName] AS
Declare @mailRecipients varchar(600) -- this will allow you to input names into the mail recpt. line
Declare @blindccrecipients varchar (102) -- if you need to blind cc the results
Declare @strMessage varchar(103) -- you can put in your own header in to this to define the results
Declare @strSQL2 varchar(80) -- i use a SP here as well to run the query
Declare @table_qualifier varchar(80) -- The Subject of the message
set @mailrecipients = 'xyz@abc.com;cde@abc.com' -- use ; to seperate email addys
set @blindccrecipients = ' ' -- same here
set @strmessage = ' '-- again input here for you own header row or what ever else you want
set @strSql2= 'sp_StoredProcedureName-- you can put in a query here or use an alternate sp
set @table_qualifier = 'SubjectLine of E-Mail'
EXEC master..xp_sendmail @recipients = @mailrecipients
,@dbuse = AirClic
,@blind_copy_recipients = @blindccrecipients
,@message = @strMessage
,@query = @strSQL2
,@attach_results = False -- here you can attach results in a .txt file or if false it appeares in the body of the e-mail
,@subject = @table_qualifier
,@no_header = False -- use actual query header
,@width = 100
GO
The sp i use for the query is just a std. select query.
Then i schedule a DTS Package to run this procudure using the execute sql task i call this procedure.. then i schedule it in a job