Skip to content

Commit

Permalink
feat: null 혹은 empty 주소 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
SHEOMM committed Sep 7, 2024
1 parent 05bfd40 commit f55e1cc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit f55e1cc

Please sign in to comment.