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

Commit

Permalink
Merge pull request #192 from hardingadonis/nghia-fix-send-email
Browse files Browse the repository at this point in the history
Fix content and title in send email
  • Loading branch information
hardingadonis authored Mar 18, 2024
2 parents 2286abf + 4328dcd commit 2a686c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 2a686c2

Please sign in to comment.