From 63ad2929d8db52502bdd374ba555ff6a91bfc37c Mon Sep 17 00:00:00 2001 From: geek Date: Fri, 7 Jul 2017 12:17:18 +0900 Subject: [PATCH] email method rename --- .../overflow/module/email/service/EmailAuthService.java | 6 +++--- .../overflow/module/email/service/EmailAuthServiceTest.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java b/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java index ec9a4f9..e2db11a 100644 --- a/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java +++ b/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java @@ -30,7 +30,7 @@ public class EmailAuthService { public EmailAuth sendEmailByMember(long memberId, String memberEmail) { try { - this.sendSimpleEmail(memberEmail, "Test Spring Mail", "Confirm Email"); + this.sendSimpleEmail(memberEmail, "Confirm Email", "Confirm Email"); }catch (MailException e) { e.printStackTrace(); } @@ -61,7 +61,7 @@ public class EmailAuthService { return this.emailAuthDAO.save(emailAuth); } - public void sendSimpleEmail(String to, String sub, String message) throws MailException { + private void sendSimpleEmail(String to, String sub, String message) throws MailException { SimpleMailMessage message1 = new SimpleMailMessage(); message1.setTo(to); @@ -72,7 +72,7 @@ public class EmailAuthService { mailSender.send(message1); } - public void sendMailWithAttachment(String to, String sub, String text, String path) throws MessagingException { + private void sendMailWithAttachment(String to, String sub, String text, String path) throws MessagingException { MimeMessage message = mailSender.createMimeMessage(); // pass 'true' to the constructor to create a multipart message MimeMessageHelper helper = new MimeMessageHelper(message, true); diff --git a/src/test/java/com/loafle/overflow/module/email/service/EmailAuthServiceTest.java b/src/test/java/com/loafle/overflow/module/email/service/EmailAuthServiceTest.java index 91c4f9b..fd42067 100644 --- a/src/test/java/com/loafle/overflow/module/email/service/EmailAuthServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/email/service/EmailAuthServiceTest.java @@ -23,6 +23,6 @@ public class EmailAuthServiceTest { @Test public void TestMailSend() throws Exception { - this.emailAuthService.sendEmail("geek@loafle.com","Spring Email Test","Spring Email Test"); + this.emailAuthService.sendEmailByMember((long)1, "geek@loafle.com"); } } \ No newline at end of file