Start work for auto close notify

This commit is contained in:
2025-08-05 21:04:37 -07:00
parent d8cd8d4a57
commit 5c721c22e2
2 changed files with 18 additions and 1 deletions
+3
View File
@@ -17,6 +17,9 @@ Server:
JobCleanupService: JobCleanupService:
Need to update notification email Need to update notification email
CompanyEmailVerify:
Need to update notification email
Client: Client:
jobs/editor: jobs/editor:
Job Listing Skills exists but isn't implimented in the UI Job Listing Skills exists but isn't implimented in the UI
@@ -11,6 +11,17 @@ namespace BoredCareers.Services.TimerService {
_em = em; _em = em;
} }
public string Substitue(string message, string subString, string Replacement) {
for (int i = 0; i < (message.Length - subString.Length); i++) {
if (message.Substring(i, subString.Length) == subString) {
string before = message.Substring(0, i);
string after = message.Substring(i + subString.Length);
return before + Replacement + after;
}
}
return message;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken) { protected override async Task ExecuteAsync(CancellationToken stoppingToken) {
while (!stoppingToken.IsCancellationRequested) { while (!stoppingToken.IsCancellationRequested) {
try { try {
@@ -37,7 +48,10 @@ namespace BoredCareers.Services.TimerService {
string[] emails = await _db.GetApplicationResponseEmailFromJobListing(listing.JobListingID); string[] emails = await _db.GetApplicationResponseEmailFromJobListing(listing.JobListingID);
foreach (string email in emails) { foreach (string email in emails) {
// Send Notify Email // Send Notify Email
_em.Send(email, EmailService.JobAutoClosedSubject, EmailService.JobAutoClosedEmail); string emailbody = EmailService.JobAutoClosedBody;
//Substitue(emailbody, "@job", listing.JobListingID);
_em.Send(email, EmailService.JobAutoClosedSubject, emailbody);
} }
} }