-
-
Notifications
You must be signed in to change notification settings - Fork 168
Expand file tree
/
Copy pathcreateCommentReportEmailTemplate.ts
More file actions
40 lines (39 loc) · 1.22 KB
/
createCommentReportEmailTemplate.ts
File metadata and controls
40 lines (39 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
type ReportDetails = {
reason: string;
url: string;
id: number;
email: string;
comment: string;
username: string;
userId: string;
reportedBy: {
username: string;
id: string;
email: string;
};
};
export const createCommentReportEmailTemplate = (
reportDetails: ReportDetails,
) =>
`
<!DOCTYPE html>
<html>
<body>
<div style="font-family: Arial, sans-serif;">
<div style='padding:3rem; background-color:black; color:white;'>
<p>Details of reported post: ${reportDetails.reason}</p>
<a style="color:yellow" href="${reportDetails.url}">Post Link</a>
<p style='padding:3rem; border: 2px solid white;'>Comment : ${reportDetails.comment}</p>
<p>commment made by user : ${reportDetails.comment} </p>
<p>comment ID : ${reportDetails.id}</p>
<p>Comment user information: Username - ${reportDetails.username}, Email - ${reportDetails.email}, User ID - ${reportDetails.userId} </p>
</div>
<br>
<br>
<p>Comment left by the reporter : @${reportDetails.reportedBy.username} </p>
<p>users email : ${reportDetails.reportedBy.email}</p>
<p>users id : ${reportDetails.reportedBy.id}</p>
</div>
</body>
</html>
`;