![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a DTS job with a send mail task that required a change to the attached file parameter. As the task isn't generic, we simply opened the send mail object and changed the relevant value. Once we resaved the package, MAPI logins failed. I checked the task, and it turns out that it is using the incorrect profile. The valid SQL Mail profile is not available for selection, so this can't be corrected. For security reasons, developers are unable to log onto to the server using the account that runs SQLagent, so we can't just log in to the correct profile. We can view / test the SQL Mail profile via Enterprise Manager, but it doesn't appear in the Send Mail task. As a work around, I used a dynamic properties to set the profile and now everything is fine. My question is - is there a better way of doing this? I'd rather not have to set dynamic properties for every send mail task that runs. We are setting up several off-line report generators, and would like the users to receive emails when their report is complete. This means that each package will contain multiple Send Mails, and dynamically setting each one is ridiculous... |
#3
| |||
| |||
|
|
In script you can enumerate all tasks, looking for send mail tasks, and automatically set the profile to a defined value. I suggest that this value is stored in a global variable. I always set certain global variables on load, or as part of the first task. snip |
![]() |
| Thread Tools | |
| Display Modes | |
| |