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 |
corvalion
Starting Member
6 Posts |
Posted - 2004-07-21 : 08:23:51
|
how can i pass a database variable to @recipientsie so i can change the table names etc instead of changing the triger.I am totally self taught so be gentle. |
|
JasonGoff
Posting Yak Master
158 Posts |
Posted - 2004-07-21 : 08:42:17
|
Assuming you are running some sort of Stored Procedure...In the procedure you need....DECLARE @recip VARCHAR(100) --or whateverSELECT @recip=MyRecipientFieldFROM MyTableWHERE ... etcexec xp_sendmail @recip,'Hello' |
|
|
corvalion
Starting Member
6 Posts |
Posted - 2004-07-22 : 05:45:08
|
thanks worked a treat. just one more question can you do a read receipt on it as well ? I suspect not. |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-22 : 08:07:13
|
I don't believe you can. The xp_mail functions only work against a particular box. You can read the "unread" status of email in that box with xp_readmail, but you cannot check on status of emails you have sent out from that box. Make sense?Also, if you plan on using this much you should look up the following in Books Online, which does a great job of explaining xp_mail functions:xp_sendmailxp_readmailxp_deletemailxp_findnextmsgxp_startmailxp_stopmailThere is one thing you could check out. When you send mail, you are allowed to define a "type". I'm not really sure what this is as I've never used it.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
|
|
|
|
|