cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict emails to suppliers after termination date crosses current date

0 Kudos

Hi,

We have a requirement wherein we need to send emails to Master Agreement collaborators only and make sure that emails are not sent to suppliers(by default sent to both) when termination date crosses current date.

Any suggestion will be helpful.

Thanks & Regards,

Mayank

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member227405
Participant
0 Kudos

Hi Mayank,

You have to write the custom mail using custom template provided in Mailconfiguration and in the reciepent you should give only the collaborator member mail id.

>mailTypeEnum = new MailTypeEnumType(MailTypeEnumType.ODP_CUSTOM_TEMPLATE1);// take teh template one

>NotificationUtil.sendNotification(recipients, sender, mailTypeEnum, props, null, null);

and  for colaborator recipient:

HashMap recipientInfo = new HashMap();

coll = IBean.getCollaborators();

itr = coll.iterator();

while(itr.hasNext()){

member = itr.next();

if(!member.getSilent()){

type = member.getCollaboratorType().toString();

if("group".equals(type)){

recipientInfo.putAll(//get the email and name of the gropu member using HasMap));

}

else if("user".equals(type)){

recipientInfo.put(member.getCollaboratorEmail(), member.getDisplayName());

}

get the email id from recipientInfo and assign to  String array "recipients"

I think this will hep you

Thanks

Sonu