From f55e1cc6d4b716c63b8393ed16396cc13aad4842 Mon Sep 17 00:00:00 2001 From: SHEOMM Date: Sun, 8 Sep 2024 01:21:14 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20null=20=ED=98=B9=EC=9D=80=20empty=20?= =?UTF-8?q?=EC=A3=BC=EC=86=8C=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../waruru/areyouhere/email/service/JavaEmailServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/waruru/areyouhere/email/service/JavaEmailServiceImpl.java b/src/main/java/com/waruru/areyouhere/email/service/JavaEmailServiceImpl.java index 50ba7a3..ba28478 100644 --- a/src/main/java/com/waruru/areyouhere/email/service/JavaEmailServiceImpl.java +++ b/src/main/java/com/waruru/areyouhere/email/service/JavaEmailServiceImpl.java @@ -6,6 +6,7 @@ import com.waruru.areyouhere.email.exception.InvalidEmailDestinationException; import jakarta.mail.Message.RecipientType; import jakarta.mail.MessagingException; +import jakarta.mail.SendFailedException; import jakarta.mail.Session; import jakarta.mail.Transport; import jakarta.mail.internet.InternetAddress; @@ -52,7 +53,7 @@ private void sendSimpleMessage(String to, String title, String content) { MimeMessage msg = setMessage(to, from, content, session); doSend(session, msg); - } catch (SMTPSendFailedException e) { + } catch (SendFailedException e) { throw new InvalidEmailDestinationException(); }catch (MessagingException | UnsupportedEncodingException e){ throw new EmailSendException(e.getMessage());