We help IT Professionals succeed at work.

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 ..


Thanks
Comment
Watch Question

Commented:
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)
http://www.sqldev.net/xp/xpsmtp.htm
David ToddSenior Database Administrator
CERTIFIED EXPERT
Commented:
Hi,

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.

Cheers
  David
Robb HillSenior .Net Full Stack Developer
CERTIFIED EXPERT

Author

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
CERTIFIED EXPERT
Top Expert 2012
Commented:
As srafi78 has suggested the simplest solution is using xp_smtp_sendmail
Robb HillSenior .Net Full Stack Developer
CERTIFIED EXPERT

Author

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 Full Stack Developer
CERTIFIED EXPERT

Author

Commented:
Thanks for your suggestions.  Great answers just not how I wanted to accomplish the task.  

Explore More ContentExplore courses, solutions, and other research materials related to this topic.