Sending Log File in mail -
07-12-2006
, 10:23 AM
Hi,
I am pretty new at DTS development. I am using the logging feature to
write the execution status to a text file. I then want to send mail
with the file as an attachment when the DTS completes (whether it fails
or succeeds). I've tried several things. I now have a parent dts that
has an ExecutePackage Task that does all of the nitty gritty processing
and writes to the log file. Upon completion of that, there is a
sendmail task to attach the log file and send the mail. The problem is
that I am getting the MAPI error: Could not open attached file, error.
I have the ExecutePackage task set to "Close connection on completion".
I also have all the tasks within the package that the ExecutePackage
task is calling set to the same.
I've also tried not having the parent dts and doing all processing in
one. In the one dts, I had the sendmail free-standing (not contingent
on any other step) but I get the old log file, not the one updated at
the time of execution. Is there a way to delay a step? I tried putting
the sendmail after the last step "on completion" but it never seems to
get to it (if there is an error).
Any thoguhts is appreciated!
Thanks!
JennB |