Initial commit after migration to gitea

This commit is contained in:
2026-01-18 11:27:43 +03:30
parent a21039410c
commit ea4b8eb543
196 changed files with 45567 additions and 9 deletions

View File

@@ -0,0 +1,41 @@
import { Injectable } from "@nestjs/common";
import { MailerService } from "@nestjs-modules/mailer";
@Injectable()
export class MailService {
constructor(private readonly mailerService: MailerService) {}
async sendMail(email, otp: string): Promise<any> {
let status: object;
await this.mailerService
.sendMail({
to: email,
from: "noreply@yara724.com",
subject: "YARA724 Company",
text: "welcome",
html: `
<h1 style="text-align:center">yara724 verificateion </h1>
<h3 style="background:#FFA500;width:150px; margin:0 auto; padding:10px; font-size:25px; border-radius:15px; text-align:center;">
<div style="color:white">
${otp}
</div>
</h3>
`,
})
.then((success) => {
if (success) {
status = {
message: "email was sent successfully",
code: 200,
emailSent: true,
};
}
})
.catch((err) => {
if (err) {
status = { message: "please try again", code: 500, emailSent: false };
}
});
return status;
}
}