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 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-10-06 : 06:48:43
|
| i am hoping someone has encountered this before:i'm trying to run an exe mail application from sql. here's my problem:if i execute the file from a job and use cmdexec as type of job step, it works fine,but if i use tsql and run it from a stored proc, it doesn't fail but won't send the mail.here's the sample code:from cmdexec job: c:\program files\sendmail.exe "parameter"from tsql job : exec spSendMailcreate proc spSendMailasexec master..xp_cmdshell 'c:\program files\sendmail.exe "parameter"'gothanks in advance... |
|
|
kselvia
Aged Yak Warrior
526 Posts |
Posted - 2004-10-06 : 10:48:15
|
| Try exec master..xp_cmdshell '"c:\program files\sendmail.exe" "parameter"'Or exec master..xp_cmdshell 'c:\progra~1\sendmail.exe "parameter"'--KenI want to die in my sleep like my grandfather, not screaming in terror like his passengers. |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-10-07 : 02:22:14
|
quote: Originally posted by kselvia exec master..xp_cmdshell 'c:\progra~1\sendmail.exe "parameter"'--Ken
thanks ken, this worked. |
 |
|
|
|
|
|