Page 1 of 1

Maintaining more than one Send Mail Template ?

Posted: Wed Sep 22, 2004 11:33 am
by asnagaraj
Hi ppl,

I have two set of jobs in a project. Each of the set of jobs should send mails to two different set of ppl.

Job Set 1 -> send mail to mail ids (abc@abc.com, def@def.com)
Job Set 2 -> send mail to mail ids (ghi@ghi.com, jkl@jkl.com)

Is it possible to modify and maintain two different templates for this ?

Iam using Notification stage. (No (unix shell script / DSSendmail routine))
I am not planning to change the From/To section in the JobNotificationActivity.

Please let me know a solution at the soonest.

Naga.

Re: Maintaining more than one Send Mail Template ?

Posted: Wed Sep 22, 2004 12:58 pm
by JDionne
Naga, can you please back up for me a bit. How did you get the template to sent to two diferent people? I have had to write some crazy crap to use 3rd party mail systems to get DS to send to more than one person. Can you step me through what you did?
Jim
asnagaraj wrote:Hi ppl,

I have two set of jobs in a project. Each of the set of jobs should send mails to two different set of ppl.

Job Set 1 -> send mail to mail ids (abc@abc.com, def@def.com)
Job Set 2 -> send mail to mail ids (ghi@ghi.com, jkl@jkl.com)

Is it possible to modify and maintain two different templates for this ?

Iam using Notification stage. (No (unix shell script / DSSendmail routine))
I am not planning to change the From/To section in the JobNotificationActivity.

Please let me know a solution at the soonest.

Naga.

Posted: Wed Sep 22, 2004 1:01 pm
by chulett
This shouldn't be a problem and doesn't involve a need for different templates. :? Not being totally sure what you mean by "job sets", this answer may be a little off. I'm also not sure what you meant by "I am not planning to change the From/To section in the JobNotificationActivity".

If you need to send the same email in one job to two different people, you can do it in two ways. 1) put both email addresses in the "Recipients email address" with a space between them or 2) if possible, setup an email group that includes both emails and then send your email to the group.

If you need to send two different emails, use two Notification Activity stages.

Not sure it that answers your question or not...

Posted: Thu Sep 23, 2004 11:52 am
by asnagaraj
I think i confused. Here is what i need.

I have 2 separate sequence of jobs in a single project. One sequence is scheduled to run everyday and it sends mails to a group of people. The second sequence is scheduled to run once in a week and it has to send mails to a completely disjoint set of people from what sequence one sends.

I am using Job sequencers and Job notification activity. I am giving a logical from and to email addresses in my Job Notification activity. I altered the dssendmail template text file to have the actual EMail address so that in future if i have to add one or more email addresses or remove anything, i can remove it just in the template and neednt really care about changing all Jobs.

In this scenario how can i send mails to different groups for every sequence of jobs ?

is it possible ?

Posted: Thu Sep 23, 2004 12:10 pm
by ketfos
Hi,
Since you putting the email list in the send template itself, it will not be possible to have two different email list in the template.

I think Chulett suggestion is the right way of doing it.
This way your template will remain a general and not specific.

Ketfos

Posted: Thu Sep 23, 2004 12:56 pm
by chulett
asnagaraj wrote:I altered the dssendmail template text file to have the actual EMail address so that in future if i have to add one or more email addresses or remove anything, i can remove it just in the template and neednt really care about changing all Jobs.
This is what is generally known as a "Bad Idea" and is not the way to go. :wink:

Seriously, you can't maintain multiple templates, so you are boxing yourself in trying to do it this way. Using Contact/Email Groups is the most flexible way to handle email notification addressing, allowing you to maintain who gets what without having to touch the jobs.

Or you could write your own email 'wrapper' routines, which would allow you to parameterize any of the fields. That way, for instance, a list of email addresses could be passed in as a Job Parameter.