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 |
dejjan
Yak Posting Veteran
99 Posts |
Posted - 2006-01-19 : 09:27:06
|
Hello,I have one sp which brings me a plain text. declare @str varchar(8000)exec sp_mail @str outputThat text I want to send via mail. For this purpose I use ActiveX Script:"Function Main()Set objEmail = CreateObject("CDO.Message")objEmail.From = "name@gmail"objEmail.To = "name@gmail"objEmail.Subject = "Test" objEmail.Textbody = ????????objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _ "mySMTP" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25objEmail.Configuration.Fields.UpdateobjEmail.Send Main = DTSTaskExecResult_SuccessEnd Function"My question is, how could I use @str as parameter to be textbody for my mail (objEmail.Textbody = ????????). I tryied by using global variable 'X' and call it with objEmail.Textbody = DTSGlobalVariables("X").valueBut it couldn't work. Or I made some mistakes in defining parameters.Any help ? |
|
|
|
|