@@ -15,11 +15,163 @@ export function sendMail(toMail: string, verifyUrl: string) {
1515 const mailOptions = {
1616 from : process . env . SMTP_USERNAME , // sender address
1717 to : toMail , // list of receivers
18- subject : '账号验证' , // Subject line
19- // text: 'Hello world?', // plain text body
20- html : `<h1>你正在注册网站,你的邮箱验证链接为(12小时内有效)</h1><br/><br/><a target="_blank" href="${ verifyUrl } ">点我验证</a>` , // html body
18+ subject : 'ChatGPT Web 账号验证' , // Subject line
19+ html : `
20+ <div class="page flex-col">
21+ <div class="box_3 flex-col" style="
22+ display: flex;
23+ position: relative;
24+ width: 100%;
25+ height: 206px;
26+ background: #ef859d2e;
27+ top: 0;
28+ left: 0;
29+ justify-content: center;
30+ "><div class="section_1 flex-col" style="
31+ background-image: url("https://ghproxy.com/https://raw.githubusercontent.com/Chanzhaoyu/chatgpt-web/main/src/assets/avatar.jpg");
32+ position: absolute;
33+ width: 152px;
34+ height: 152px;
35+ display: flex;
36+ top: 130px;
37+ background-size: cover;
38+ border-radius: 50%;
39+ margin: 10px;
40+ "></div></div>
41+ <div class="box_4 flex-col" style="
42+ margin-top: 92px;
43+ display: flex;
44+ flex-direction: column;
45+ align-items: center;
46+ ">
47+ <div class="text-group_5 flex-col justify-between" style="
48+ display: flex;
49+ flex-direction: column;
50+ align-items: center;
51+ margin: 0 20px;
52+ ">
53+ <span class="text_1" style="
54+ font-size: 26px;
55+ font-family: PingFang-SC-Bold, PingFang-SC;
56+ font-weight: bold;
57+ color: #000000;
58+ line-height: 37px;
59+ text-align: center;
60+ "><target="_blank" style="text-decoration: none; color: #0088cc;">ChatGPT Web</a> 账号验证</span>
61+
62+ <div class="box_2 flex-row" style="
63+ margin: 0 20px;
64+ min-height: 128px;
65+ background: #F7F7F7;
66+ border-radius: 12px;
67+ margin-top: 34px;
68+ display: flex;
69+ flex-direction: column;
70+ align-items: flex-start;
71+ padding: 32px 16px;
72+ width: calc(100% - 40px);
73+ ">
74+
75+ <div class="text-wrapper_4 flex-col justify-between" style="
76+ display: flex;
77+ flex-direction: column;
78+ margin-left: 30px;
79+ margin-bottom: 16px;
80+ ">
81+ <hr>
82+ <span class="text_3" style="
83+ <div style="font-family: Arial, sans-serif; font-size: 16px; color: #333;">
84+ <h1 style="color: #0088cc;">
85+ 感谢您使用
86+ <target="_blank" style="text-decoration: none; color: #0088cc;">ChatGPT Web</a>,
87+ 您的邮箱验证链接为(12小时内有效):
88+ </span>
89+ </div><hr style="
90+ display: flex;
91+ position: relative;
92+ border: 1px dashed #ef859d2e;
93+ box-sizing: content-box;
94+ height: 0px;
95+ overflow: visible;
96+ width: 100%;
97+ "><div class="text-wrapper_4 flex-col justify-between" style="
98+ display: flex;
99+ flex-direction: column;
100+ margin-left: 30px;
101+ ">
102+ <hr>
103+ </h1>
104+ <p style="margin-top: 20px;">
105+ 请点击以下按钮进行验证:
106+ <span class="text_4" style="
107+ margin-top: 6px;
108+ margin-right: 22px;
109+ font-size: 16px;
110+ font-family: PingFangSC-Regular, PingFang SC;
111+ font-weight: 400;
112+ color: #000000;
113+ line-height: 22px;
114+ "></span>
115+ </div>
116+
117+ <a class="text-wrapper_2 flex-col" style="
118+ min-width: 106px;
119+ height: 38px;
120+ background: #ef859d38;
121+ border-radius: 32px;
122+ display: flex;
123+ align-items: center;
124+ justify-content: center;
125+ text-decoration: none;
126+ margin: auto;
127+ margin-top: 32px;
128+ " href="${ verifyUrl } ">
129+ <span class="text_5" style="
130+ color: #DB214B;
131+ ">点我验证</span>
132+ </a>
133+ </div>
134+ <div class="text-group_6 flex-col justify-between" style="
135+ display: flex;
136+ flex-direction: column;
137+ align-items: center;
138+ margin-top: 34px;
139+ ">
140+ <span class="text_6" style="
141+ height: 17px;
142+ font-size: 12px;
143+ font-family: PingFangSC-Regular, PingFang SC;
144+ font-weight: 400;
145+ color: #00000045;
146+ line-height: 17px;
147+ ">此邮件由服务器自动发出,直接回复无效。</span>
148+ <a class="text_7" style="
149+ height: 17px;
150+ font-size: 12px;
151+ font-family: PingFangSC-Regular, PingFang SC;
152+ font-weight: 400;
153+ color: #DB214B;
154+ line-height: 17px;
155+ margin-top: 6px;
156+ text-decoration: none;
157+ " href="https://github.com/Chanzhaoyu/chatgpt-web">项目作者</a>
158+ <a class="text_8" style="
159+ height: 17px;
160+ font-size: 12px;
161+ font-family: PingFangSC-Regular, PingFang SC;
162+ font-weight: 400;
163+ color: #DB214B;
164+ line-height: 17px;
165+ margin-top: 6px;
166+ text-decoration: none;
167+ " href="https://github.com/Kerwin1202/chatgpt-web">邮箱注册功能作者</a>
168+ </div>
169+ </div>
170+ </div>
171+ ` , // html body
21172 }
22173
174+
23175 // send mail with defined transport object
24176 transporter . sendMail ( mailOptions , ( error , info ) => {
25177 if ( error )
0 commit comments