Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2004-04-14 : 18:47:41
|
| HiI want to write a procedure which get some value from my query and send an eamil at an specific time. So lets suppose I have total orders and total shiped values and wanna email these values. can some one help me.Thanks in advanceAsim |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-04-14 : 18:51:39
|
| Have you configured SQL Mail? If so, you can use xp_sendmail.Tara |
 |
|
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2004-04-14 : 19:04:37
|
| Thnx TaraI am looking at those things but can u tell me how to schedule it, can i have a refrence example for this.Thnx againAsim |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-04-14 : 21:31:09
|
| In Enterprise Manger, you need to expand Management...SQL Agent...Jobs. You will need to add a job by right-clicking on the job and clicking on "New Job". YOu then need to set it up to run under an account that has permission to use xp_sendmail (such as the sa account) by choosing a proper owner. On the Steps tab, you need to add a job step that has the following:EXEC master..xp_sendmail 'email1@yahooz.com;email2@yahooz.com','Put a Title Here','EXEC database.owner.StoredProcedure'GOYou can then schedule the job to run whenever you please.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2004-04-15 : 08:41:53
|
| ThnxI have one problem when iam selecting the profile from sqlmail and run test it gives me an error.Although my mail from out look is working perfect. can someone help me regarding mail profileThanks |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-04-15 : 12:12:24
|
| http://support.microsoft.com/default.aspx?scid=kb;EN-US;263556Tara |
 |
|
|
|
|
|