chore: add anti spamming and headers to email send

This commit is contained in:
mahyargdz
2025-07-15 12:22:08 +03:30
parent 60d29f8e93
commit 964026286f
7 changed files with 472 additions and 28 deletions
+6 -2
View File
@@ -16,9 +16,13 @@ export class EmailController {
constructor(private readonly emailService: EmailService) {}
@Post("send")
@ApiOperation({ summary: "Send an email" })
@ApiOperation({
summary: "Send an email with configurable headers based on type",
description:
"Send emails with automatic anti-threading and anti-spam headers. Supports different email types: general, transactional, marketing, anti-threading. Marketing emails require listId and unsubscribeUrl.",
})
@ApiResponse({ status: 201, description: "Email sent successfully" })
@ApiResponse({ status: 400, description: "Invalid email data" })
@ApiResponse({ status: 400, description: "Invalid email data or missing required fields for email type" })
@ApiResponse({ status: 403, description: "Not authorized to send email" })
sendEmail(@UserDec("wildduckUserId") userEmailId: string, @Body() sendEmailDto: SendEmailDto) {
return this.emailService.sendEmail(userEmailId, sendEmailDto);