Skip to content

Commit

Permalink
Merge pull request #1376 from innovationacademy-kr/dev
Browse files Browse the repository at this point in the history
dev to main
  • Loading branch information
sichoi42 authored Sep 2, 2023
2 parents 994157f + 5f7c890 commit 1a649be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public class GmailProperties {
@Value("${spring.mail.port}")
private int mailServerPort;

@Value("${spring.mail.display-sender-name}")
private String displaySenderName;

@Value("${spring.mail.username}")
private String username;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void sendMail(String name, String to, String subject, String template)
MimeMessage message = javaMailSender.createMimeMessage();
MimeMessageHelper helper = new MimeMessageHelper(message, true, "UTF-8");

helper.setFrom(gmailProperties.getUsername());
helper.setFrom(gmailProperties.getDisplaySenderName() + " <" + gmailProperties.getUsername() + ">");
helper.setTo(to);
helper.setSubject(subject);

Expand Down
1 change: 1 addition & 0 deletions backend/src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ spring:
no-risk-of-blackhole: 0 42 1 1 * * # 매월 1일 1시 42분 0초

mail:
display-sender-name: "42CABI"
soonoverdue:
term: -1
subject: "42CABI 사물함 연체 예정 알림"
Expand Down

0 comments on commit 1a649be

Please sign in to comment.