Skip to content

PSP-11282 CHES email service#5252

Open
areyeslo wants to merge 4 commits intobcgov:devfrom
areyeslo:PSP-11282-CHES-Email-Service
Open

PSP-11282 CHES email service#5252
areyeslo wants to merge 4 commits intobcgov:devfrom
areyeslo:PSP-11282-CHES-Email-Service

Conversation

@areyeslo
Copy link
Collaborator

@areyeslo areyeslo commented Mar 12, 2026

  • CHES implementation and health check

Sample payload:

{
  "to": ["john.doe@gov.bc.ca"],
  "cc": [],
  "bcc": [],
  "subject": "Test Email from PIMS",
  "body": "Hello World",
  "bodyType": "html",
  "encoding": "utf-8",
  "priority": "normal"
}
image

Note: Retrieve secrets from OCP dev environment.

Jira

@areyeslo areyeslo self-assigned this Mar 12, 2026
@areyeslo areyeslo added enhancement New feature or request .NET Pull requests that update .net code labels Mar 12, 2026
Comment on lines +39 to +42
catch (Exception ex)
{
return new HealthCheckResult(context.Registration.FailureStatus, $"CHES health check failed with exception: {ex.Message}");
}

Check notice

Code scanning / CodeQL

Generic catch clause Note

Generic catch clause.
Comment on lines +99 to +106
catch (Exception ex)
{
result.Status = ExternalResponseStatus.Error;
result.Message = $"Exception sending CHES email: {ex.Message}";
result.Payload = null;
result.HttpStatusCode = System.Net.HttpStatusCode.InternalServerError;
_logger.LogError(ex, "Exception sending CHES email.");
}

Check notice

Code scanning / CodeQL

Generic catch clause Note

Generic catch clause.
@areyeslo areyeslo force-pushed the PSP-11282-CHES-Email-Service branch from d4f59b7 to 1bf6579 Compare March 12, 2026 18:51
@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5252

1 similar comment
@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5252

@areyeslo areyeslo force-pushed the PSP-11282-CHES-Email-Service branch 2 times, most recently from 376598d to 08842ad Compare March 12, 2026 19:26
@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5252

@areyeslo areyeslo force-pushed the PSP-11282-CHES-Email-Service branch from 08842ad to 316be9f Compare March 13, 2026 17:39
@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5252

@eddherrera
Copy link
Collaborator

I am not sure if this is the architecture we should use. I was expecting something similar to the "Scheduler" service for documents ( async => de-coupled micro-service).

@areyeslo areyeslo force-pushed the PSP-11282-CHES-Email-Service branch from 6957cef to b8ef315 Compare March 13, 2026 23:33
@areyeslo areyeslo marked this pull request as ready for review March 13, 2026 23:33
@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5252

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request .NET Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants