Start work for auto close notify
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user