Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Global Var - parameter? into a sendmail

Status
Not open for further replies.

SQLScholar

Programmer
Aug 21, 2002
2,127
GB
Hey all,

In a DTS package I have a global var. In the SQL tasks we can pass parametres then set the parametre to the global var.

Now the question....

How do i pass this global var into a sendmail task?

So for instance, currently the var is the rundate. So how can i make the subject of the email say -

"Report name - " & rundate

(obviously without the " and &)

Thanks all

Dan


----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
I have not found a way to do this, but I wonder if a dynamic properties task could handle it?

I normally use script tasks to send mail, because it gives me more flexibility. I will try and post some code later to get you started (if no one else has an easier way). What does the body of your email normally look like?

Good Luck,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Just a simple email with an attachement to a couple of people.

That would be great thanks

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
I don't think CDO/SMTP will work for you if you need to attach a file. I have not been able to make it work anyway. You may want to take a look at this:


I'm going to see if it'll work for me, but I doubt it will. I'll test it out and get back to you.

Ignorance of certain subjects is a great part of wisdom
 
A dymamic properties task will be able to make this change for you.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Right click your mail task
Click on Workflow Properties
Click on use ActiveX Script then click Properties

Then follow the example from this site


Well Done is better than well said
- Ben Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top