diff --git a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java index 27cb752..41f792e 100644 --- a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java +++ b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java @@ -68,12 +68,18 @@ public class MemberService { Member resMember = this.memberDAO.save(member); - this.emailAuthService.sendEmailByMember(member.getId(), member.getEmail()); + try { + this.emailAuthService.sendEmailByMember(member.getId(), member.getEmail()); + } catch (MailException e) { + // Todo ReSend Mail + e.printStackTrace(); + } + return resMember; } - public Member sendEmailForPassword(String email) throws UnsupportedEncodingException, MailException { + public Member sendEmailForPassword(String email) throws UnsupportedEncodingException { Member member = this.memberDAO.findByEmail(email); if (null == member) { @@ -82,7 +88,13 @@ public class MemberService { String en = this.emailSender.encrypt(email); String encode = URLEncoder.encode(en, "UTF-8"); - this.emailSender.sendSimpleEmail(email,"Password Reset Email", "http://127.0.0.1:9091/#/account/reset_password?key="+ encode +"\r\nConfirm Email"); + try { + this.emailSender.sendSimpleEmail(email,"Password Reset Email", "http://127.0.0.1:9091/#/account/reset_password?key="+ encode +"\r\nConfirm Email"); + } catch (MailException e) { + // Todo ReSend Mail + e.printStackTrace(); + } + return member; } @@ -154,7 +166,7 @@ public class MemberService { public Member read(long memberId) { if (memberId <= 0) { - // Todo MemberId null Exception + throw new SignInIdNotExistException(); } Member resMember = this.memberDAO.findOne(memberId);