From f54a4aad8cdff00f2bbac984b1e98fb1add038be Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 22 Feb 2019 01:18:51 -0600 Subject: Refine Local Agent.sh use Issue-ID: AAF-770 Change-Id: Ic6593bde1e16db35cf538cb1d2caa152016f3a82 Signed-off-by: Instrumental --- .../org/onap/aaf/auth/batch/reports/Notify.java | 48 ++++++++++++---------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'auth/auth-batch') diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/Notify.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/Notify.java index 189857c9..bf73c1da 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/Notify.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/Notify.java @@ -200,30 +200,34 @@ if(!identity.isPerson()) { identity = identity.responsibleTo(); } - for(int i=1;i0 && nb.count()>=maxEmails) { - break ONE_EMAIL; + + StringBuilder content = new StringBuilder(); + content.append(String.format(header,version,Identity.mixedCase(identity.firstName()))); + + nb.body(noAvg, content, indent, notify, id); + content.append(footer); + + if(mailer.sendEmail(noAvg, test, toList, ccList, subject,content.toString(), urgent)) { + nb.inc(); + } else { + trans.error().log("Mailer failed to send Mail"); + } + if(maxEmails>0 && nb.count()>=maxEmails) { + break ONE_EMAIL; + } } } } catch (OrganizationException e) { -- cgit 1.2.3-korg