Dynamic Notification_Activity
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 8
- Joined: Mon Apr 13, 2009 5:01 am
- Location: KOLKATA
Dynamic Notification_Activity
Hi
I want to add the list of recepient address from a text file.
Can you please tell me how can i do this.Also, i would like to know if it is possible to attach all the files(No.,Name unknown before run-time) of a folder as attachment.
Thanks
I want to add the list of recepient address from a text file.
Can you please tell me how can i do this.Also, i would like to know if it is possible to attach all the files(No.,Name unknown before run-time) of a folder as attachment.
Thanks
Welcome. :D
For the "list of recipients" from a text file, you'd need something (a routine perhaps) to "read" the file and return the contents of it in a properly delimited list. Load that into a job parameter and use that parameter in the "To:" portion of Notification Activity stage. Me, I find using "notification groups" a much better solution. You can still parameterize the group name, but it means a single "To:" entity that your email system then manages. And changes to the distribution list are then a simple change in the email system, which is where things like that should be maintained. IMHO.
There's no automated way to attach all files from a directory to an email. You could script something to do that and then run the script, or what I would do is zip all of the files up into a single archive and then attach / send that single archive in the email. Much cleaner. Again, IMHO.
For the "list of recipients" from a text file, you'd need something (a routine perhaps) to "read" the file and return the contents of it in a properly delimited list. Load that into a job parameter and use that parameter in the "To:" portion of Notification Activity stage. Me, I find using "notification groups" a much better solution. You can still parameterize the group name, but it means a single "To:" entity that your email system then manages. And changes to the distribution list are then a simple change in the email system, which is where things like that should be maintained. IMHO.
There's no automated way to attach all files from a directory to an email. You could script something to do that and then run the script, or what I would do is zip all of the files up into a single archive and then attach / send that single archive in the email. Much cleaner. Again, IMHO.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 8
- Joined: Mon Apr 13, 2009 5:01 am
- Location: KOLKATA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Just to make sure that we're on the same page, are you doing the 'cat' outside of the Sequence job that does the Notification? So you can then pass those values in a Job Parameters to the Sequence job and then use those job parameters in the notification stage?
If you are doing this all in the same job, you'll need to look into referencing the $CommandOutput variable of the 'cat' statge, assuming you are using an Execute Command stage for that.
If you are doing this all in the same job, you'll need to look into referencing the $CommandOutput variable of the 'cat' statge, assuming you are using an Execute Command stage for that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Then there are no parameters involved and you need to use $CommandOutput as noted above.
Code: Select all
#Execute_Command_Stage_Name.$CommandOutput#
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI