From 5366e3e2bade787dd70ba59c135dbd800703c4fa Mon Sep 17 00:00:00 2001 From: G Date: Sat, 27 Jan 2024 14:32:29 +0330 Subject: [PATCH] email update --- src/features/campaign/campaign.service.ts | 7 +++++++ src/features/schedule/schedule.service.ts | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/features/campaign/campaign.service.ts b/src/features/campaign/campaign.service.ts index a53ae9aea..044556fd7 100644 --- a/src/features/campaign/campaign.service.ts +++ b/src/features/campaign/campaign.service.ts @@ -63,6 +63,10 @@ export class CampaignService { emailReceivers: any[], ) { if (!emailCampaign && emailReceivers && emailReceivers[0]) { + console.log('email test...'); + console.log(emailCampaign && emailCampaign.title); + console.log(emailReceivers && emailReceivers[0]); + await this.createCampaign( campaignEmailCode, CampaignNameEnum.MONTHLY_CAMPAIGNS, @@ -90,6 +94,9 @@ export class CampaignService { smsReceivers: any[], ) { if (!smsCampaign && smsReceivers && smsReceivers[0]) { + console.log('sms test...'); + console.log(smsCampaign && smsCampaign.title); + console.log(smsReceivers && smsReceivers[0]); await this.createCampaign( campaignSmsCode, CampaignNameEnum.MONTHLY_CAMPAIGNS, diff --git a/src/features/schedule/schedule.service.ts b/src/features/schedule/schedule.service.ts index 6535eda59..ce5ac621c 100644 --- a/src/features/schedule/schedule.service.ts +++ b/src/features/schedule/schedule.service.ts @@ -126,11 +126,11 @@ export class ScheduleService { } } // ERROR [Scheduler] ServerError: Can't send mail - all recipients were rejected: 550 No such user here - // @Timeout(5000) - @Cron(' 00 55 13 * * Sat', { - name: 'MonthlyCampaigns try At 13:00 on Thursdays.', // we try every week and only send to those who did not receive (because their child have no needs, etc.) - timeZone: 'Asia/Tehran', - }) + @Timeout(5000) + // @Cron(' 00 55 13 * * Sat', { + // name: 'MonthlyCampaigns try At 13:00 on Thursdays.', // we try every week and only send to those who did not receive (because their child have no needs, etc.) + // timeZone: 'Asia/Tehran', + // }) async handleSummaryMailCron() { const farsiDay = persianDay(new Date()); if (farsiDay > 20) {