• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 825
  • Last Modified:

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 time....how have any of you all gotten around this ..

Robb Hill
Robb Hill
3 Solutions
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)
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
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

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.  

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now