Skip to content

Commit

Permalink
Showing 16 changed files with 1,223 additions and 282 deletions.
405 changes: 348 additions & 57 deletions apps/api/src/configs/modules/mailer-config/templates/invitation.hbs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,44 +1,68 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Add custom classes and styles that you want inlined here */
</style>
</head>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Add custom classes and styles that you want inlined here */
</style>
</head>

<body>
<div class="bg-light">
<div class="container p-4 bg-white">
<div class="stack-col gap-8 w-full">
<img width="123" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/title-ufb.png" />
<div>
<img class="ax-center mb-10" width="88" height="100"
src="https://line-objects-dev.com/abc-user-feedback-email/email-signup.png" />
<div class="text-center fw-700 text-lg mb-3">Sign up to UserFeedback</div>
<div class="text-center fw-400 text-sm mb-6">This link will be expire after 24 hours or if it is used once.
<body>
<div class="bg-light">
<div class="container bg-white p-4">
<div class="stack-col w-full gap-8">
<img
width="123"
height="24"
src="{{baseUrl}}/assets/mailing/title-ufb.png"
/>
<div>
<img
class="ax-center mb-10"
width="88"
height="100"
src="{{baseUrl}}/assets/mailing/email-signup.png"
/>
<div class="fw-700 mb-3 text-center text-lg">
Sign up to UserFeedback
</div>
<div class="fw-400 mb-6 text-center text-sm">
This link will be expire after 24 hours or if it is used once.
</div>
<a href="{{link}}" class="ax-center btn btn-black w-56">Sign Up</a>
</div>
<a href='{{link}}' class="ax-center btn btn-black w-56">Sign Up</a>
</div>
<div class="text-center fw-400 text-xs text-secondary">This email cannot accept email. Do not reply to this
email.</div>
<div style="background: #78788014">
<div class="mt-6 mb-6 stack-row gap-3 ax-center">
<a href="https://line.me">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/globe-fill.png" />
</a>
<a href="https://github.com/line/abc-user-feedback">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/github-mark.png" />
</a>
<a href="mailto:[email protected]">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/mail-fill.png" />
</a>
<div class="fw-400 text-secondary text-center text-xs">
This email cannot accept email. Do not reply to this email.
</div>
<div style="background: #78788014">
<div class="stack-row ax-center mb-6 mt-6 gap-3">
<a href="https://line.me">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/globe-fill.png"
/>
</a>
<a href="https://github.com/line/abc-user-feedback">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/github-mark.png"
/>
</a>
<a href="mailto:[email protected]">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/mail-fill.png"
/>
</a>
</div>
<div class="fw-400 text-secondary mb-6 text-center text-xs">
@ ABC Studio
</div>
</div>
<div class="text-center fw-400 text-xs text-secondary mb-6">@ ABC Studio</div>
</div>
</div>
</div>
</div>
</body>

</html>
</body>
</html>
405 changes: 348 additions & 57 deletions apps/api/src/configs/modules/mailer-config/templates/resetPassword.hbs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,44 +1,68 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Add custom classes and styles that you want inlined here */
</style>
</head>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Add custom classes and styles that you want inlined here */
</style>
</head>

<body>
<div class="bg-light">
<div class="container p-4 bg-white">
<div class="stack-col gap-8 w-full">
<img width="123" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/title-ufb.png" />
<div>
<img class="ax-center mb-10" width="88" height="100"
src="https://line-objects-dev.com/abc-user-feedback-email/email-reset.png" />
<div class="text-center fw-700 text-lg mb-3">Reset Password</div>
<div class="text-center fw-400 text-sm mb-6">This link will be expire after 24 hours or if it is used once.
<body>
<div class="bg-light">
<div class="container bg-white p-4">
<div class="stack-col w-full gap-8">
<img
width="123"
height="24"
src="{{baseUrl}}/assets/mailing/title-ufb.png"
/>
<div>
<img
class="ax-center mb-10"
width="88"
height="100"
src="{{baseUrl}}/assets/mailing/email-reset.png"
/>
<div class="fw-700 mb-3 text-center text-lg">Reset Password</div>
<div class="fw-400 mb-6 text-center text-sm">
This link will be expire after 24 hours or if it is used once.
</div>
<a href="{{link}}" class="ax-center btn btn-black w-56"
>Reset Password</a
>
</div>
<a href='{{link}}' class="ax-center btn btn-black w-56">Reset Password</a>
</div>
<div class="text-center fw-400 text-xs text-secondary">This email cannot accept email. Do not reply to this
email.</div>
<div style="background: #78788014">
<div class="mt-6 mb-6 stack-row gap-3 ax-center">
<a href="https://line.me">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/globe-fill.png" />
</a>
<a href="https://github.com/line/abc-user-feedback">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/github-mark.png" />
</a>
<a href="mailto:[email protected]">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/mail-fill.png" />
</a>
<div class="fw-400 text-secondary text-center text-xs">
This email cannot accept email. Do not reply to this email.
</div>
<div style="background: #78788014">
<div class="stack-row ax-center mb-6 mt-6 gap-3">
<a href="https://line.me">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/globe-fill.png"
/>
</a>
<a href="https://github.com/line/abc-user-feedback">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/github-mark.png"
/>
</a>
<a href="mailto:[email protected]">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/mail-fill.png"
/>
</a>
</div>
<div class="fw-400 text-secondary mb-6 text-center text-xs">
@ ABC Studio
</div>
</div>
<div class="text-center fw-400 text-xs text-secondary mb-6">@ ABC Studio</div>
</div>
</div>
</div>
</div>
</body>

</html>
</body>
</html>
387 changes: 332 additions & 55 deletions apps/api/src/configs/modules/mailer-config/templates/verification.hbs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,43 +1,66 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Add custom classes and styles that you want inlined here */
</style>
</head>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Add custom classes and styles that you want inlined here */
</style>
</head>

<body>
<div class="bg-light">
<div class="container p-4 bg-white">
<div class="stack-col gap-8 w-full">
<img width="123" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/title-ufb.png" />
<div>
<img class="ax-center mb-10" width="88" height="100"
src="https://line-objects-dev.com/abc-user-feedback-email/email-code.png" />
<div class="text-center fw-700 text-lg mb-3">Check Out Code</div>
<div class="text-center fw-700 text-2xl mb-3">{{code}}</div>
<div class="text-center fw-400 text-sm">This link will be expire after 5 minutes or if it is used once.</div>
</div>
<div class="text-center fw-400 text-xs text-secondary">This email cannot accept email. Do not reply to this
email.</div>
<div style="background: #78788014">
<div class="mt-6 mb-6 stack-row gap-3 ax-center">
<a href="https://line.me">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/globe-fill.png" />
</a>
<a href="https://github.com/line/abc-user-feedback">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/github-mark.png" />
</a>
<a href="mailto:dl_abc_userfeedback@linecorp.com">
<img width="24" height="24" src="https://line-objects-dev.com/abc-user-feedback-email/mail-fill.png" />
</a>
<body>
<div class="bg-light">
<div class="container bg-white p-4">
<div class="stack-col w-full gap-8">
<img
width="123"
height="24"
src="{{baseUrl}}/assets/mailing/title-ufb.png"
/>
<div>
<img
class="ax-center mb-10"
width="88"
height="100"
src="{{baseUrl}}/assets/mailing/email-code.png"
/>
<div class="fw-700 mb-3 text-center text-lg">Check Out Code</div>
<div class="fw-700 mb-3 text-center text-2xl">{{code}}</div>
<div class="fw-400 text-center text-sm">
This link will be expire after 5 minutes or if it is used once.
</div>
</div>
<div class="fw-400 text-secondary text-center text-xs">
This email cannot accept email. Do not reply to this email.
</div>
<div style="background: #78788014">
<div class="stack-row ax-center mb-6 mt-6 gap-3">
<a href="https://line.me">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/globe-fill.png"
/>
</a>
<a href="https://github.com/line/abc-user-feedback">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/github-mark.png"
/>
</a>
<a href="mailto:dl_abc_userfeedback@linecorp.com">
<img
width="24"
height="24"
src="{{baseUrl}}/assets/mailing/mail-fill.png"
/>
</a>
</div>
<div class="fw-400 text-secondary mb-6 text-center text-xs">
@ ABC Studio
</div>
</div>
<div class="text-center fw-400 text-xs text-secondary mb-6">@ ABC Studio</div>
</div>
</div>
</div>
</div>
</body>

</html>
</body>
</html>
13 changes: 11 additions & 2 deletions apps/api/src/shared/mailing/email-verification-mailing.service.ts
Original file line number Diff line number Diff line change
@@ -15,17 +15,26 @@
*/
import { MailerService } from '@nestjs-modules/mailer';
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';

import type { ConfigServiceType } from '@/types/config-service.type';
import type { SendMailDto } from './send-mail.dto';

@Injectable()
export class EmailVerificationMailingService {
constructor(private readonly mailerService: MailerService) {}
private readonly baseUrl: string;

constructor(
private readonly mailerService: MailerService,
private readonly configService: ConfigService<ConfigServiceType>,
) {
this.baseUrl = this.configService.get('smtp', { infer: true }).baseUrl;
}
async send({ code, email }: SendMailDto) {
await this.mailerService.sendMail({
to: email,
subject: `User feedback Email Verification`,
context: { code },
context: { code, baseUrl: this.baseUrl },
template: 'verification',
});
}
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ export class ResetPasswordMailingService {
subject: `User feedback Reset Password`,
context: {
link: `${this.baseUrl}/link/reset-password?code=${code}&email=${email}`,
baseUrl: this.baseUrl,
},
template: 'resetPassword',
});
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ export class UserInvitationMailingService {
subject: `User Feedback Invitation`,
context: {
link: `${this.baseUrl}/link/user-invitation?code=${code}&email=${email}`,
baseUrl: this.baseUrl,
},
template: 'invitation',
});
Binary file added apps/web/public/assets/mailing/email-code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/assets/mailing/email-reset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/assets/mailing/email-signup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/assets/mailing/github-mark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/assets/mailing/globe-fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/assets/mailing/mail-fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/assets/mailing/title-ufb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f8908e0

Please sign in to comment.