Skip to content

Commit

Permalink
email update
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Jan 27, 2024
1 parent d6afe18 commit 5366e3e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions src/features/campaign/campaign.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions src/features/schedule/schedule.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ export class ScheduleService {
}
}
// ERROR [Scheduler] ServerError: Can't send mail - all recipients were rejected: 550 <[email protected]> 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) {
Expand Down

0 comments on commit 5366e3e

Please sign in to comment.