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
+2 -1
View File
@@ -99,6 +99,7 @@ export class UsersService {
const emailAddress = `${username}@${domain.name}`;
const finalUserName = `${username}-${domain.name}`;
const finalDisplayName = `${username}`;
const existingUser = await this.userRepository.findOne({ emailAddress });
if (existingUser) throw new BadRequestException(UserMessage.EMAIL_ADDRESS_ALREADY_EXISTS);
@@ -131,7 +132,7 @@ export class UsersService {
emailEnabled: true,
emailQuota: userQuota,
wildduckUserId: mailServerUser.id,
displayName: displayName || username,
displayName: finalDisplayName || displayName || username,
isActive: true,
business,
domain,