Email Through DTS

I am using sql 2000 DTS packages and Outlook 2003.
I am running the package from a scheduler...which in turn means I have to have an outlook profile setup on the server to send email.

I am looking for best practices on how to handle this.  I really do not want to leave outlook running all the have any of you all gotten around this ..

LVL 11
Robb HillSenior .Net DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You are better off using the email server (we use MS exchange server) and xp_smtp_sendmail

See (@server is the email server name/ip)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David ToddSenior DBACommented:

Is the DTS package running on the SQL Server? Does the SQL Server have SQL mail setup? If yes to both, why not use the send email task in the DTS package? It doesn't need outlook running, jsut needs it to be setup.

Robb HillSenior .Net DeveloperAuthor Commented:
I am not sure about SQL Server having sql mail setup..I will check into that and get back on the post.

.I know that when my dts package utilized the send email task....and outlook was closed on the server...the email did not send....finally when we reopened outlook the email was sent....

Did you do something different in setup on your end to send mail without have outlook open...or is this behavior different possibly because of setting up SQL Mail
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Anthony PerkinsCommented:
As srafi78 has suggested the simplest solution is using xp_smtp_sendmail
Robb HillSenior .Net DeveloperAuthor Commented:
Thanks for your answers...send mail is a viable solution but I wanted to use the objects built in to DTS.
Here was my approach.
1)  Setup an exchange account on the SQL Server box for the network user account which runs the SQL Service Admin account and called that email profile within outlook 2003 sp3 "spADMIN".
Now if I could login to the box I could build a DTS with outlook emialing capabilities.  Since I do not access the production SQL Server, to get around this I created a dummy email account on my client machine with the profile name of spADMIN.  When I drop an email object in DTS I configure the email addreses using my real email account...then when I save it I switch the profile name of the email back to spADmin.  Then when the job runs on the scheduler SQL Server is able to send email and I can utilize this very handy built in feature without having to write a stored procedure every time I want email.
Robb HillSenior .Net DeveloperAuthor Commented:
Thanks for your suggestions.  Great answers just not how I wanted to accomplish the task.  
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.