chore: add anti spamming and headers to email send
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user