July 13, 2005 at 2:31 pm
Is there anyway to use Global Variables in the Message Section of the Send Mail Task? Is there anyway to specify dynamic values within the Send Mail Task? We have SQL Server 2000 SP3.
Thanks in advance for your assistance, Kevin
July 13, 2005 at 5:48 pm
You can use a Dynamic Properties task to assign Global Variables to the appropriate properties in the Send Mail task.
--------------------
Colt 45 - the original point and click interface
July 14, 2005 at 6:42 am
If you're trying to build a message body that contains Global Variables it might have to code an ActiveX/VBScript to set another Global Variable that has the contains the entire message body, then use Dynamic Properties to assign that Global Variable to the mail step's message body property.
If you're using ActiveX/VBScript to send SMTP mail you can merely access the Global Variables in the ActiveX script to construct your mail message.
I prefer to send SMTP mail since it doesn't require installation of Outlook on the SQL Server and it has a lot more flexibility. I wrote a DTS package that has one step in it that builds a mail message entirely from Global Variables and sends it. I then use the Execute Package task which allows you to set the values to be passed to the Mail Package Global Variables. It simplifies things tremendously. If our SMTP server changes I just change it once in the Mailer Package SMTP_Server Global Variable and I'm done!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply