修改邮件工具
Some checks failed
CI Build and Test / build (push) Has been cancelled
Deploy to Server / build-and-deploy (push) Has been cancelled

This commit is contained in:
2025-10-20 18:14:49 +08:00
parent 4602f73957
commit c176edead5

View File

@@ -102,37 +102,57 @@ public class EmailUtil {
"<html>" + "<html>" +
"<head>" + "<head>" +
"<meta charset=\"UTF-8\">" + "<meta charset=\"UTF-8\">" +
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">" +
"<style>" + "<style>" +
"body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }" + "* { margin: 0; padding: 0; box-sizing: border-box; }" +
".container { max-width: 600px; margin: 0 auto; padding: 20px; }" + "body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f5f5f5; padding: 20px; }" +
".header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px; text-align: center; border-radius: 5px 5px 0 0; }" + ".email-wrapper { max-width: 560px; margin: 0 auto; background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }" +
".content { background: #f9f9f9; padding: 30px; border-radius: 0 0 5px 5px; }" + ".header { background: linear-gradient(120deg, #4158D0 0%, #C850C0 100%); padding: 32px 24px; text-align: center; }" +
".code-box { background: white; border: 2px dashed #667eea; padding: 20px; margin: 20px 0; text-align: center; border-radius: 5px; }" + ".logo { font-size: 28px; font-weight: 700; color: #ffffff; letter-spacing: 1px; margin: 0; }" +
".code { font-size: 32px; font-weight: bold; color: #667eea; letter-spacing: 5px; }" + ".content { padding: 40px 32px; }" +
".tips { color: #666; font-size: 14px; margin-top: 20px; }" + ".greeting { font-size: 16px; color: #333; margin-bottom: 24px; line-height: 1.6; }" +
".footer { text-align: center; margin-top: 20px; color: #999; font-size: 12px; }" + ".code-container { background: linear-gradient(135deg, #f5f7fa 0%, #f8f9fc 100%); border-radius: 8px; padding: 28px; text-align: center; margin: 24px 0; border: 1px solid #e8ecf1; }" +
".code-label { font-size: 13px; color: #666; margin-bottom: 12px; letter-spacing: 0.5px; }" +
".code { font-size: 36px; font-weight: 700; color: #4158D0; letter-spacing: 8px; font-family: 'Courier New', monospace; }" +
".divider { height: 1px; background: linear-gradient(to right, transparent, #e0e0e0, transparent); margin: 32px 0; }" +
".notice { background: #fff8f0; border-left: 3px solid #ff9800; padding: 16px; border-radius: 4px; margin: 24px 0; }" +
".notice-title { font-size: 14px; color: #e65100; font-weight: 600; margin-bottom: 8px; }" +
".notice-text { font-size: 13px; color: #666; line-height: 1.6; }" +
".tips { font-size: 13px; color: #888; line-height: 1.8; }" +
".footer { padding: 24px 32px; background: #fafafa; text-align: center; border-top: 1px solid #eee; }" +
".footer-text { font-size: 12px; color: #999; line-height: 1.8; }" +
".footer-link { color: #4158D0; text-decoration: none; }" +
"</style>" + "</style>" +
"</head>" + "</head>" +
"<body>" + "<body>" +
"<div class=\"container\">" + "<div class=\"email-wrapper\">" +
"<div class=\"header\">" + "<div class=\"header\">" +
"<h2>CoreWing 验证码</h2>" + "<h1 class=\"logo\">CoreWing</h1>" +
"</div>" + "</div>" +
"<div class=\"content\">" + "<div class=\"content\">" +
"<p>您好!</p>" + "<div class=\"greeting\">Hi好!</div>" +
"<p>您正在进行身份验证,您的验证码是:</p>" + "<p style=\"color: #555; font-size: 14px; line-height: 1.8; margin-bottom: 20px;\">" +
"<div class=\"code-box\">" + "感谢使用 CoreWing。我们收到了你的验证请求请使用以下验证码完成操作" +
"</p>" +
"<div class=\"code-container\">" +
"<div class=\"code-label\">验证码</div>" +
"<div class=\"code\">" + code + "</div>" + "<div class=\"code\">" + code + "</div>" +
"</div>" + "</div>" +
"<div class=\"notice\">" +
"<div class=\"notice-title\">重要提示</div>" +
"<div class=\"notice-text\">验证码 5 分钟内有效,请勿泄露给他人</div>" +
"</div>" +
"<div class=\"divider\"></div>" +
"<div class=\"tips\">" + "<div class=\"tips\">" +
"<p>⏰ 验证码有效期为 <strong>5分钟</strong>,请尽快使用。</p>" + "如果这不是你本人的操作,可以直接忽略这封邮件,你的账号仍然是安全的。<br>" +
"<p>🔒 为了您的账户安全,请勿将验证码告知他人。</p>" + "有任何问题都可以联系我们的客服团队。" +
"<p>❓ 如果这不是您本人的操作,请忽略此邮件。</p>" +
"</div>" + "</div>" +
"</div>" + "</div>" +
"<div class=\"footer\">" + "<div class=\"footer\">" +
"<p>此邮件由系统自动发送,请勿回复。</p>" + "<div class=\"footer-text\">" +
"<p>&copy; 2025 CoreWing. All rights reserved.</p>" + "这是一封自动发送的邮件,请不要直接回复<br>" +
"© 2025 CoreWing · 保留所有权利" +
"</div>" +
"</div>" + "</div>" +
"</div>" + "</div>" +
"</body>" + "</body>" +