How to execute a DTSSendMailTask from within a package? -
05-11-2004
, 10:56 AM
I need to create a DTS package that will email a file as an attachment to multiple recipients. The problem that I encountered in the past was that if any recipient in ToLine was no longer, the whole task would fail. This time I created a DTSSendMailTask and modified its properties (except ToLine) programmatically using DTSActiveScriptTask. Now I want to either
- Execute the DTSSendMailTask for each recipient as many times as necessary, changing ToLine to one recepient at a time, o
- Try to resolve each recipient's name and rebuild ToLine, excluding those that failed to resolv
Neither method worked. Attempt to use Task.Execute returned something like "Invalid method or property assignment", CustomTask.Execute returned something like "Invalid number of arguments" (although none should be required), and attempt to resolve names one by one resulted in general MAPI errors.
Anybody who has experience sending emails from a script within a DTS package, please help
Thanks
Le |