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!

SendMail with Attachment

Status
Not open for further replies.

bdc1

Technical User
Jun 29, 2004
12
US
I have run into some problems trying to e-mail Excel documents from within a DTS package.

Everytime I try to use SendMail with an attachement as part of a package with multiple steps, it fails with the error "MAPI error: could not open attached file".

The odd thing is, if I'm in DTS designer and right click that step it runs. If I put the SendMail step in a separate package, it will run. It only fails when I connect it to other steps. (It's a pretty simple set-up: the results of an query on a SQL Server 2000 db are written to an exisiting excel file, then e-mailed).

The work around that I have for this is okay for now. I have two packages. The first runs the query and writes the data to the excel file, the second has just the SendMail step. Then I have them set up as different steps within a single job run by the SQL Server Agent.

But the next project that I have will involve writing data to multiple excel files, each of which will get sent to different recipients, so I'm not sure that this will work that well in more complex scenario.

Any ideas would be greatly appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top