Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Fix content and title in send email #192

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
}
}
Order saveOrder = Singleton.orderDAO.save(order);
SendEmailUtil.sendOrderMessage(customer.get().getEmail(), "Slae Dock - Đặt hàng thành công", saveOrder);
SendEmailUtil.sendOrderMessage(customer.get().getEmail(), "Sale Dock - Đặt hàng thành công", saveOrder);
SessionUtil.getInstance().removeValue(request, "productMap");
response.sendRedirect("./order?message=orderSuccess");
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private void checkEmail(HttpServletRequest request, HttpServletResponse response
if (employee.isPresent()) {
request.setAttribute("message", "success");
String newOtp = OtpUtil.generateRandomOTP();
SendEmailUtil.sendGetOTPMessage(email, "New OTP", newOtp);
SendEmailUtil.sendGetOTPMessage(email, "Sale Dock - Quên mật khẩu?", newOtp);
SessionUtil.getInstance().putValue(request, "otp", newOtp);
SessionUtil.getInstance().putValue(request, "email", email);
request.getRequestDispatcher("/view/jsp/others/login/otp.jsp").forward(request, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ public static void sendGetOTPMessage(String to, String title, String otp) {
+ "<head>\n"
+ " <meta charset=\"UTF-8\">\n"
+ " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n"
+ " <title>Get OTP</title>\n"
+ " <title>Lấy mã OTP</title>\n"
+ "</head>\n"
+ "<body style=\"margin-bottom: 10px;\">\n"
+ " <h3>Welcome to Sale Dock</h3>\n"
+ " <p>Your OTP to change your account password is: " + otp + "</p>\n"
+ " <p>Please usse this OTP to change your old password.</p>\n"
+ " <h3>Chào mừng đến với Sale Dock</h3>\n"
+ " <p> OTP của bạn là: " + otp + "</p>\n"
+ " <p>Vui lòng sử dụng mã trên để thực hiện quá trình thay đổi mật khẩu.</p>\n"
+ " <img src=\"\" style=\"\">\n"
+ "</body>\n"
+ "</html>";
Expand Down
Loading