Skip to content

Commit

Permalink
Nexial v2.0 Release Candidate
Browse files Browse the repository at this point in the history
Signed-off-by: automike <[email protected]>
  • Loading branch information
mikeliucc committed Mar 6, 2019
1 parent 979727d commit 525fd3f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/kotlin/org/nexial/core/model/EventNotification.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ class EmailNotification(context: ExecutionContext, event: ExecutionEvent, data:
return
}

val content = OutputFileUtils.resolveContent(
StringUtils.trim(StringUtils.substringAfterLast(data, EVENT_CONFIG_SEP)), context, false)
val content = StringUtils.substringAfter(data, EVENT_CONFIG_SEP)
if (StringUtils.isBlank(content)) {
logSkipping("no content to sent")
return
Expand All @@ -96,11 +95,13 @@ class EmailNotification(context: ExecutionContext, event: ExecutionEvent, data:
"from" -> mailData.fromAddr = value
"html" -> mailData.mimeType = if (BooleanUtils.toBoolean(value)) MIME_HTML else MIME_PLAIN
"footer" -> mailData.isFooter = BooleanUtils.toBoolean(value.toLowerCase())
"body" -> body = OutputFileUtils.resolveContent(StringUtils.trim(value), context, false)
"body" -> body = StringUtils.trim(value)
else -> ConsoleUtils.error("Unknown configuration for email notification: $key")
}
}

if (StringUtils.isNotEmpty(body)) body = OutputFileUtils.resolveContent(StringUtils.trim(body), context, false)

return mailData.setToAddr(recipientList).setSubject(subject).setContent(body)
}

Expand Down

0 comments on commit 525fd3f

Please sign in to comment.