-
SQl mail
Hi,
I want to send emails every day to some persons and the email should contain data from tables(i.e. select * from table).Now how can i do it i.e how can i define a job which executes the above statement and send the mail automatically everyday.
Any help would be appreciated.
Thanks,
Krishnan.
-
SQl mail (reply)
This is what i recommand you to do:
1- Create a new job
2- In the general tab, give a name to your job
3- in the steps tab, create a new step
4- Give a name to the step, choose Transact-SQL Script in the Type combo box
5- Choose the database
6- In the command text box, write something like this:
exec master..xp_sendmail
@recipients='aaa@hotmail.com;bbb@hotmail.com;c cc@hotmail.com',
@query='select 1', --This is your query
@attachments='fichier.txt', --This is the name of the file sent by mail
@attach_results='true',
@subject='Test e-mail' --Subject of the mail
7- To schedule it go in the schedules tab
Hope this help
Martin
------------
sajai krishnan at 7/19/00 11:23:22 AM
Hi,
I want to send emails every day to some persons and the email should contain data from tables(i.e. select * from table).Now how can i do it i.e how can i define a job which executes the above statement and send the mail automatically everyday.
Any help would be appreciated.
Thanks,
Krishnan.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|