chore: add new feature for the ai generate template
This commit is contained in:
@@ -17,7 +17,7 @@ import { UserRepository } from "../../users/repositories/user.repository";
|
||||
import { EMAIL_QUEUE_CONSTANTS } from "../constants/email-events.constant";
|
||||
import { BulkActionDto, BulkActionType } from "../DTO/bulk-actions.dto";
|
||||
import { MessageListQueryDto, SearchMessagesQueryDto } from "../DTO/email-query.dto";
|
||||
import { EmailRecipientDto, EmailType, SendEmailDto, UpdateDraftDto } from "../DTO/send-email.dto";
|
||||
import { EmailRecipientDto, SendEmailDto, UpdateDraftDto } from "../DTO/send-email.dto";
|
||||
import { PriorityEnum } from "../enums/email-header.enum";
|
||||
import { IEmailMap } from "../interfaces/email-map.interface";
|
||||
|
||||
@@ -38,8 +38,6 @@ export class EmailService {
|
||||
|
||||
//########################################################
|
||||
async sendEmail(wildduckUserId: string, userId: string, sendEmailDto: SendEmailDto) {
|
||||
this.logger.log(`Sending ${EmailType.GENERAL} email from user ${wildduckUserId} to ${sendEmailDto.to.map((t) => t.address).join(", ")}`);
|
||||
|
||||
const user = await this.userRepository.findOne({ wildduckUserId, deletedAt: null }, { populate: ["business"] });
|
||||
if (!user) throw new BadRequestException(EmailMessage.USER_NOT_FOUND);
|
||||
this.logger.log(`Processing email through business template for business: ${user.business.id}`);
|
||||
|
||||
Reference in New Issue
Block a user