email method rename
This commit is contained in:
parent
22c47f850d
commit
63ad2929d8
|
@ -30,7 +30,7 @@ public class EmailAuthService {
|
||||||
|
|
||||||
public EmailAuth sendEmailByMember(long memberId, String memberEmail) {
|
public EmailAuth sendEmailByMember(long memberId, String memberEmail) {
|
||||||
try {
|
try {
|
||||||
this.sendSimpleEmail(memberEmail, "Test Spring Mail", "Confirm Email");
|
this.sendSimpleEmail(memberEmail, "Confirm Email", "Confirm Email");
|
||||||
}catch (MailException e) {
|
}catch (MailException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public class EmailAuthService {
|
||||||
return this.emailAuthDAO.save(emailAuth);
|
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();
|
SimpleMailMessage message1 = new SimpleMailMessage();
|
||||||
message1.setTo(to);
|
message1.setTo(to);
|
||||||
|
@ -72,7 +72,7 @@ public class EmailAuthService {
|
||||||
mailSender.send(message1);
|
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();
|
MimeMessage message = mailSender.createMimeMessage();
|
||||||
// pass 'true' to the constructor to create a multipart message
|
// pass 'true' to the constructor to create a multipart message
|
||||||
MimeMessageHelper helper = new MimeMessageHelper(message, true);
|
MimeMessageHelper helper = new MimeMessageHelper(message, true);
|
||||||
|
|
|
@ -23,6 +23,6 @@ public class EmailAuthServiceTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void TestMailSend() throws Exception {
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user